My first robocar includes a PICKIT 2 proto board. It has a built in potentiometer. I would like to use that pot to control my code's PWM signal from PORTC.0.
Presently I preset the constant FORWARD to a number between 115 and 123. That number is one of the arguments to my HPWM command for PORTC.0. If 123, the car goes very fast. If 115, the car creeps. I would like to make FORWARD a variable which is set within these limits on-the-fly as a result of the position of the pot.
This will force me to use ASM code which is good. This also forces me to think which can be a problem. I am not good SEARCHing this forum. Any pointers would be most welcome.
Ken
Bookmarks