|
Re: Programming Puzzle
I was not able to find that, but maybe i'm missing it.
I have drafted up some code that can (using the pt by pt zero crossing vi) count the number and direction of zero crossings and then calculate an integer for the number of full rotations. After that point, it simply multiplies that number by 5 and adds that to the number that it is receiving from the sensor.
From that, I added PID functionality to control the spinning of the motor.
We will see how it works tomorrow
|