So I have a simple autonomous right now for Skyrise. I made a new one that does something completely different, but here’s where I got stuck. I have an Optical Shaft Encoder on one side of the robot. In EasyC, how can I convert the encoder’s data into degrees, as in degrees in turning? I want it to go 90 degrees to the left. Please help!
You can just use some method of printing the encoder data (lcd, debugger window, etc) to find out how many encoder ticks it takes to turn 90, 180, 360, or however many degrees. Then divide that number (the number of encoder ticks) by how many degrees the robot turned and now you have ticks per degree. Now you can use this number in your code to calculate how many encoder ticks you need to turn by to turn however many degrees you want.
Whatever you come up with will probably have to be adjusted as depending on how you program the robot to turn it will likely drift/overshoot. You can also just use testing to find how many ticks you need to turn 90 degrees and not bother with converting.