ok, so i built the arduino/relay tutorial thats here Arduino Playground - HomePage
and it works great. i had to get rid of the resistor thought, i wasn't getting enough power to trip the relay with it.
the idea is i want to add a second relay possibly on pin 12 to fire after the first relay fires 20 or so times and then repeat.
i found some code that i altered a bit by adding outPin2 and
as you can tell im sure by the fact that im here, im having a little trouble. i suck at code. this is the error i get
error: expected unqualified-id before numeric constant in function
'void loop()':
Bad error line -2
im smart enough to know ( int outPin = 12) isnt right i just dont know whats wrong or what to change it too.
ok, so wouldnt you know that as soon as i posted this i saw some ;'s missing in the code, after i replaced them it compiles fine, sorry.
does anyone see anything in there that will keep it from working for what i want?
thanks in advance for your time
Hi,
a blind guess if your second relay is connected to output-pin2 the 100 Millisecond delay is far to short for a mechanic relay to reliable switch on and off. Try your code with the 10000 ms delay used for the first relay.
Sorry AWOL, im trying to trigger a second relay after the first relay had been triggered from hi to low about 30 times and then repeat. i thought i had explained it in my post. again sorry.
WAYODA this is pretty much what i was looking for, something i totally missed. i hadnt thought about the time it takes the Michanical relay to trip. taking that into account, i think 500ms might even be better for what im trying to do.
thank you