Help configuring IDE software

General support questions and discussions.

Help configuring IDE software

Postby jono » Mon Dec 30, 2013 12:07 pm

Could someone assist me in configuring the IDE software? I'm hung up beginning line 70 since I really don't understand this code or programming language. I've simply got one open/closed connection on the door as well as the connection into the opener button.
jono
 
Posts: 7
Joined: Mon Dec 30, 2013 11:59 am

Re: Help configuring IDE software

Postby support » Mon Dec 30, 2013 12:18 pm

Are you having any error messages displayed in the Arduino IDE ? Please provide the error(s) you are seeing
or please provide more details as to what isn't working as you'd expect it to ...
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: Help configuring IDE software

Postby jono » Mon Dec 30, 2013 4:40 pm

No errors. I simply have no clue on how to correctly alter the code and I'm not clearly understanding the instructions.
jono
 
Posts: 7
Joined: Mon Dec 30, 2013 11:59 am

Re: Help configuring IDE software

Postby support » Mon Dec 30, 2013 4:45 pm

Ok ... First, have you read the documentation (PDF) available from the download section off our web site ?

If so and you still have doubts, please provide specific questions for areas on which you're not clear ...

Best regards,
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: Help configuring IDE software

Postby jono » Mon Dec 30, 2013 4:50 pm

Yes, I have.
For some reason, this part makes no sense to me. I suspect that it's because I have zero experience with coding/programming.
I have one open/closed sensor on my door and wires running from the button console as well.
My understanding is that they are Analog Pin #2 and Digital pin #2 respectively.
As such (if I'm correct) I wasn't sure what to alter.

static const uint8_t relayPins[] = { 9 }; // single device at pin #9
//static uint8_t relayPins[] = { 2, 3, 4, 5 }; // select if using DFRobot RelayShield
//static uint8_t relayPins[] = { 2, 3 }; // two devices at pins #2 and #3
//static uint8_t relayPins[] = { 2, 3, 4, ... }; // even more devices at pins #2, #3, #4, etc ...

// status contact should be connected to these analog input pins (anologRead).
// Adjust to match the number of devices you have hooked up (examples provided below in comment) ...

static const uint8_t statusPins[] = { 3 }; // single device at pin #3
//static uint8_t statusPins[] = { 2, 3, 4, 5 }; // select if using DFRobot RelayShield
//static uint8_t statusPins[] = { 2, 3 }; // two devices at pins #2 and #3
//static uint8_t statusPins[] = { 2, 3, 4, ... }; // even more devices at pins #2, #3, #4, etc ...

// status reading strategy (uncomment only one ... the one that reflects how you want status to be interpreted)

#define STATUS_STRATEGY_3VCLOSED_5VOPENED // initial approach - uses analogRead combined with STATUS_OPEN_TRESHOLD (opened == +5v, closed == +3v)
//#define STATUS_STRATEGY_5VCLOSED_3VOPENED // alternate approach - uses analogRead combined with STATUS_OPEN_TRESHOLD (opened == +3v, closed == +5v)
//#define STATUS_STRATEGY_NORMALLY_CLOSED // classic door sensor - uses digitalRead to interpret door/device status (opened == high-impedance, closed == GND)
//#define STATUS_STRATEGY_NORMALLY_OPENED // alternate approach - uses digitalRead to interpret door/device status (opened == GND, closed == high-impedance)

// Analog boundary value (0-1023) used to distinguish between device/door status == opened and closed. Only applicable
// when STATUS_STRATEGY_3VCLOSED_5VOPENED or STATUS_STRATEGY_5VCLOSED_3VOPENED is being used.

#define STATUS_OPEN_TRESHOLD 1000
jono
 
Posts: 7
Joined: Mon Dec 30, 2013 11:59 am

Re: Help configuring IDE software

Postby jono » Mon Dec 30, 2013 5:18 pm

I have pulled down the documentation, but frankly I'm confused and don't understand. I have one door sensor and wires running to the garage button. I believe these are Analog #2 and Digital #2 respectively. But from there I'm clueless as to what to amend in the code.

static const uint8_t relayPins[] = { 9 }; // single device at pin #9
//static uint8_t relayPins[] = { 2, 3, 4, 5 }; // select if using DFRobot RelayShield
//static uint8_t relayPins[] = { 2, 3 }; // two devices at pins #2 and #3
//static uint8_t relayPins[] = { 2, 3, 4, ... }; // even more devices at pins #2, #3, #4, etc ...

// status contact should be connected to these analog input pins (anologRead).
// Adjust to match the number of devices you have hooked up (examples provided below in comment) ...

static const uint8_t statusPins[] = { 3 }; // single device at pin #3
//static uint8_t statusPins[] = { 2, 3, 4, 5 }; // select if using DFRobot RelayShield
//static uint8_t statusPins[] = { 2, 3 }; // two devices at pins #2 and #3
//static uint8_t statusPins[] = { 2, 3, 4, ... }; // even more devices at pins #2, #3, #4, etc ...

// status reading strategy (uncomment only one ... the one that reflects how you want status to be interpreted)

#define STATUS_STRATEGY_3VCLOSED_5VOPENED // initial approach - uses analogRead combined with STATUS_OPEN_TRESHOLD (opened == +5v, closed == +3v)
//#define STATUS_STRATEGY_5VCLOSED_3VOPENED // alternate approach - uses analogRead combined with STATUS_OPEN_TRESHOLD (opened == +3v, closed == +5v)
//#define STATUS_STRATEGY_NORMALLY_CLOSED // classic door sensor - uses digitalRead to interpret door/device status (opened == high-impedance, closed == GND)
//#define STATUS_STRATEGY_NORMALLY_OPENED // alternate approach - uses digitalRead to interpret door/device status (opened == GND, closed == high-impedance)

// Analog boundary value (0-1023) used to distinguish between device/door status == opened and closed. Only applicable
// when STATUS_STRATEGY_3VCLOSED_5VOPENED or STATUS_STRATEGY_5VCLOSED_3VOPENED is being used.

#define STATUS_OPEN_TRESHOLD 1000
jono
 
Posts: 7
Joined: Mon Dec 30, 2013 11:59 am

Re: Help configuring IDE software

Postby support » Wed Jan 01, 2014 10:14 am

Hi,

First start by making the relay work. This will allow you to open and close the door. At this point,
you will not know if it's open or closed, but you have to work this incrementally. Don't try to run
before walking ...

So, for the relay to work, what you need to do is edit in the code, the following entry:
Code: Select all
static const uint8_t relayPins[] = { 9 }; // single device at pin #9
//static uint8_t relayPins[] = { 2, 3, 4, 5 }; // select if using DFRobot RelayShield
//static uint8_t relayPins[] = { 2, 3 }; // two devices at pins #2 and #3
//static uint8_t relayPins[] = { 2, 3, 4, ... }; // even more devices at pins #2, #3, #4, etc ...

Anything that follows // on any line of code gets ignored (it's called a comment) ... So on the above
lines of code, only the first one that says the relay is operated from pin #9 is actually effective.

You need to edit that code to make it match the actual pin # onto which you've
configured the relay that will open and close your door.

You will also need to configure inside the iPhone app, the actual relay pin # to match that
same value you've configured in the Arduino INO code.

Hope these additional details will help you having your setup up and running.

Best regards,
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: Help configuring IDE software

Postby jono » Wed Jan 01, 2014 12:44 pm

Thank you. I've learned a bit since my last post and edited the code accordingly. It appears that I'm receiving the typical compiler errors now. I am using Windows 7 and I can't seem to get the file organization to match.... I did load it in "Documents"

I believe that I understand commenting and un-commenting now and have amended the code to fit my setup.

I suspect that others have run into Win7 issues but don't see any prior support discussions on this. Any suggestions?

Thank you
jono
 
Posts: 7
Joined: Mon Dec 30, 2013 11:59 am

Re: Help configuring IDE software

Postby support » Wed Jan 01, 2014 3:07 pm

Not sure what compiler errors you're getting (you haven't provided them in your post), but most
often (and I'm assuming here), you typically get compiler errors when the files are not in the
right location. On Windows, they indeed need to be in your "My Documents" folder, moreover,
the "libraries" folder also needs to be in the right location, containing all of the libraries
sub-folders/files that MyDoorOpener relies on. See the following Arduino forum post about this:

http://www.arduino.cc/en/Hacking/Libraries

Included is a print-screen of the folder layout for Mac OSX. It should be somewhat similar on Windows.

When you have it working, please post back so that others can leverage the knowledge which
might be specific for Windows 7.

Best regards,
Attachments
Arduino.png
Arduino Folder Structure (OSX)
Arduino.png (57.81 KiB) Viewed 5415 times
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: Help configuring IDE software

Postby jono » Sat Jan 04, 2014 7:14 pm

I tried moving the location of the setup.
Still getting the following errors.
See PDF inside ZIP file.
Attachments
MDO-1.pdf.zip
(226.18 KiB) Downloaded 304 times
jono
 
Posts: 7
Joined: Mon Dec 30, 2013 11:59 am

Next

Return to Support



cron