DC Motor with encoder
I am a teacher that has been using the basic stamp bobot but want to move my students to a propeller based home brew robot programmed in C. We got several 12 volt dc motors that have built in encoders. We have gotten the motors to run with a L298 motor controller but would like some help controlling the speed and distance with the encoders. The problem is that we are all fairly new to propeller c. I have not been able to find sample code in c so we can start dissecting sample code and adjusting it to our purposes. If anyone could help it would be greatly appreciated.
Comments
I've done a fair amount with the Propeller and C, but I haven't tackled PWM using C. So I had hoped someone else would respond.
What I would probably do is get a PASM PWM driver from the OBEX (link in the nav bar) and port it and the Spin example to C. There's a tool called spin2cpp which can help, although the code it generates sometimes needs cleaning up.