Recently, Noopkat appeared as a guest on The Coding Train. The subject of the stream was generative art running on hardware, which was something I hadn’t considered experimenting with previously. Specifically, the stream focussed on getting the 10 Print algorithm running on an LCD screen attached to an Arduino.
I was reminded of the TVOut library for Arduino, which I’d played with before, so I thought I’d combine it with the ideas in the stream and create a new generative toy.
I wanted to make a small device, so I picked up a spare Arduino Nano, a potentiometer for adjusting the random threshold, an RCA jack for video output and a couple of resistors which form a small DAC network for generating the video signal.
I knocked up a case in Fusion 360 to hold all of the components, which wraps it up into a neat little package.
The essence of the
10 Print algorithm is randomly generating forward-leaning and backward-leaning diagonal lines in a grid pattern. Adjusting the threshold that decided which way the next line points can lead to some interesting results, so the code performs an
analogRead of the potentiometer and uses this as the threshold.