|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: arduino help
pardoning the broken speech, a relay will sufice if you just need the motor to spin one way.
You should NEVER source drive current from an arduino. Each pin is wired for only 20ma. You should source your motor current from the main bus rails of whatever you are building. If you are bent on only needing 3.3v, then you should use something like an LM317 to drop the voltage. |
|
#2
|
||||
|
||||
|
Re: arduino help
how would i set up a relay for the motor?
|
|
#3
|
||||
|
||||
|
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 |
|
#4
|
|||
|
|||
|
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 |
|
|