Kinematic Simulation with Serial Pot Data

As practice for my final project in How to Make Almost Anything, I decided to create a Python Tkinter canvas window that would simulate Dragonbot's movement in one direction, using serial data from a rotary potentiometer.

I made a board with one 10K ohm potentiometer with a range of 347 degrees, feeding into the terminal of an ATTiny45. I fed the value into the ADC sequence, converted into an 8-bit value, then sent it over serial to a Python script that interpreted the value with respect to the resolution of the pot.

With the value, I did a bit of trig, and figured out the rest of the frame's position. Then, in Tkinter, I created a line object that had its coordinates change based on the incoming angle value.

Board Layout