program flow and cogs
jdolecki
Posts: 726
I have 2 10 bit encoders on my robot base
1 for the drive motor and 1 for steering motor. along with that I have 2 voltage and current monitors for each battery.
Should I put each encoder on its own cog and both the V/I monitors on a cog also?
thanks for the help
john
1 for the drive motor and 1 for steering motor. along with that I have 2 voltage and current monitors for each battery.
Should I put each encoder on its own cog and both the V/I monitors on a cog also?
thanks for the help
john
Comments
It depends on what objects you want to use. Have they already been written? How fast to you need to monitor the sensors/encoders?
Right now I'm working on a robot with four quadrature encoders and four motors. I'm using Kye's PWM PID object that adjusts the PWM to the the motor based on the encoder readings. The problem is Kye's object uses one cog per motor. The four motors use up four cogs.
I have to decide if it's worth having some extra cogs to write my own motor driver.
So it's always a trade off. The easy thing to do is throw a cog at the problem. I bet there are many Propeller projects (mine included) that use many cogs that could probably get by with one, but with a lot of work to keep the timing correct.
Duane
John Abshier