Go Down

Topic: Strange question relating to personal code (DC Motors) (Read 2045 times) previous topic - next topic

ed001987

What do you have the motor connected to? From the names, it appears that you have some kind of motor shield.

But, I can't figure out why you have 6 names for controlling the speed and direction of one motor.
I have another motor for moving forwards and backwards, just that current sketch doesn't use it.  I was testing the turning.  Rather than figure out lots of broken things, I'll make sure one thing is perfect, then move forward from there.  (No pun intended)

Tom,

Thanks for that!  I really appreciate it!  Now I have to figure out how to hook up the servo.  Off to Google I go!

PaulS

Quote
I have another motor for moving forwards and backwards, just that current sketch doesn't use it.  I was testing the turning.
But, your turning function uses 3 of the names, TURNBRAKE, DIRSPEED, and TURNDIR. I guess I would expect that you are using a motor shield, and that you would be using the TURN side to control the brake, speed, and direction, so I'd be less confused by names like TurnBrake, TurnSpeed, and TurnDir. For turning, I really can't see the need to brake the motor. It should never get to the speed where braking is necessary.
The art of getting good answers lies in asking good questions.

ed001987

That's an old styling habit from my school programming days.  Thank you for commenting!

Go Up