Don't despair ...
You need to be patient and yes, there are hundreds (even thousands) of other people like you that have successfully
configured their Arduino to be used with the MyDoorOpener application. The MyDoorOpener forum community is not
as large though, as it's not all of our app users that have joined our forums (yet). The Arduino forum community
is much larger though. Your chances of getting the "basic/noob" help you're seeking would be much higher over
there ... Not that I want to draw traffic away from our own forums, but I'm just being realistic here ...
Indeed, what you want to do is copy/paste some code into the Arduino IDE, have it compiled and uploaded
to your Arduino. As soon as you do that, it will start running the functions called setup(), and then loop().
As their names imply, setup() is executed once to have things configured and loop() is executed in a loop
fashion. These are the program entry points. I'd suggest the following code to start with:
- Code: Select all
void setup()
{
// initializing the output pin (relay)
pinMode(###, OUTPUT);
digitalWrite(###, LOW);
}
void loop()
{
static int count = 0;
++count;
// every 1000 loops, trigger the output pin (relay)
if(count == 1000)
{
count = 0;
digitalWrite(###, HIGH);
delay(1000);
digitalWrite(###, LOW);
}
}
What the above does is the following:
1) initializes the digital pin ### (you will need to replace '###' to an appropriate digital output pin value (number, ie: 2, 3, 4, 5, ...)
that you want to test/trigger the relay for)
2) every 1000 loops, the digital pin ### will get high for 1 second, therefore you should be hearing the relay click when this happens
Don't leave this program running forever as it will be stressing your relays uselessly, but at least you'll know whether
your hardware is working/connected properly or not.
Once working with this simplistic program (and only then), take note of the value you've assigned to ### and have that value pasted
inside
MyDoorOpener.INO, in the
relaysPin array definition (near line #72).
That's it ... Hope this helps you getting on track!