|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: arduino help
how would i set up a relay for the motor?
|
|
#2
|
||||
|
||||
|
Re: arduino help
http://www.instructables.com/id/Conn...ay-to-Arduino/
the relay uses a 12v coil, but the same steps apply to using a 9v one |
|
#3
|
|||
|
|||
|
Re: arduino help
Here the code you could use:
/*********** connect an NPN transistor driving a motor to pin 9 on arduino ***********/ int motorPin = 9; void setup() { pinMode(motorPin, OUTPUT); delay(45000); digitalWrite(9, HIGH); delay(1000); digtalWrite(9, LOW); } void loop() { } |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|