18v15 Pololu Motor Controller Arduino coding

In reference to: pololu.com/docs/0J44/6.7.1

Will the code in the 2nd example allow me to extend or retract the an actuator? Or do I need to attach a rotary encoder to the Arduino using the code and setup found at circuitsathome.com/mcu/readi … on-arduino . Really sorry to clog up these forums, but I am trying to get all of this worked out before 11/24/10. Sorry

Hello.

The code in both examples shows how to drive a motor. Do you understand what it’s doing? I suggest you start by making sure you understand what the simple example does, and possibly even try it out, although make sure you take care not to damage your actuator (does it have built-in limit switches that shut it down if it reaches either end?). You will need to attach an encoder if you want to know where the actuator is, but you should be able to start playing around with it with the encoder disconnected.

- Ben

Yes, it has built in limit switches. I am going to hook it all up later today.

I recommend you start simple and slowly add complexity as you get more comfortable with things. For example, your first step should probably be to just try driving it straight from your computer using the slider bar in the Status tab of the Simple Motor Control Center. Next add in the Arduino and the simple example sketch (but try to understand what the example will do and make sure it’s safe for your particular device). I think you should only worry about adding in the encoder once you’re totally comfortable controlling the actuator without feedback.

- Ben

Sounds good. Thank you for the advice. I’m just really paranoid about breaking the controller haha