Pi Pico emulating an Etch-a-sketch
One Christmas, long, long ago, someone gave me an Etch-a-sketch . I was a bit of a klutz then (indeed, I still am). I never produced great works of art, but the Etch-a-sketch was a lot of fun to play with. Yesterday I wondered how easy it would be to emulate an Etch-a-sketch using the Raspberry Pi Pico. Using PySerial to link Pi and Pico I’d just finished yesterday’s article about how to link a host to the Pico using PySerial. Why not get the Pico to print out how far two potentiometer knobs were turned, read the output on the Pi using PySerial, and use the Turtle package on the Pi to create the display? It sounded too simple to work, so I started coding with some trepidation. The first job was to connect a couple of potentiometers to the analogue inputs of the Pico. After that I wrote a short MicroPython program which read the analogue values and printed them out. Here it is: import machine import utime pot_l = machine.ADC( 27 ) pot_r = machine.ADC( 26 ) de