#So... arduino uses C++ i think

1 messages · Page 1 of 1 (latest)

livid breachBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

pine shoal
#

Your loop condition after the 1-second delay is wrong, you want && instead of commas

#

for (angle1=90, angle2=90; angle1<=130 && angle2>=50; angle1++, angle2--){

livid breachBOT
#

@wise lagoon Has your question been resolved? If so, run !solved :)

pine shoal
#

servo motors can draw a lot of current, i'd try an external power source for the servos

sage edge
#

Depending on what board you are using, an UNO for example can handle 7-12 volts. a NANO is 3.3 volts.

pine shoal
#

quit pinging me

sage edge
#

Is it a 5v dc motor?

#

Ok have a nice day

sage edge
#

You need to look up the documentation for the board.
Skyward is correct. You may need an external source. Especially if you are using USB as power source to the board.

#

You can power the UNO with USB . The output pin will close a relay. The motor's power passes through the relay. The relay acts as a switch providing external power to the motor through the relay.

#

Sorry typo I meant
Skeward as in theSkeward. The guy above.

#

Read up on this. It is a relay that can handle 5vdc.

#

As you can see there are different voltages. 5,12,24
It only takes a small amount of current to close the relay allowing a much larger voltage to pass to the load(motor).

#

The UNO can deliver the current to close the relay. It cannot deliver the current to drive the motor.

#

You need a voltage supply for the motor.

#

Getting the motor to move is the first step and doesn't require code. Code is used to control when the motor turns on and off.

#

I suggest a power supply.

#

This will take 120vac in and give you 5vdc.

#

With something like this, you can power multiple motors.

livid breachBOT
#

@wise lagoon Has your question been resolved? If so, run !solved :)

#

Thank you and let us know if you have any more questions!

This thread is now set to auto-hide after an hour of inactivity