●●●●
Discuss this article in the Nuts & Volts forums at
http://forum.nutsvolts.com.
THE DESKTOP
By Craig A. Lindley
CONTEMPLATOR
I didn't start out to build a personal
light show for my desk, but in the
end that is what happened. It all
started when I saw a SainSmart
3. 2” 320 x 240 TFT LCD display
with built-in display controller,
touch screen controller, and SD
card interface for sale on Amazon
for $16. I already had an Arduino
Uno on hand, so connecting these
two devices seemed like a natural
thing to attempt. Having never
connected an LCD display to a
microcontroller before, I was
anxious to do so. Finding a well
written driver library (see
Resources) for this display put the
icing on the cake, so I got to work
wiring things together. In an
afternoon, I wired the LCD display
to the Arduino, downloaded and
installed the UTFT driver on my
Mac, and compiled and ran the
demos that came with the driver. I was amazed at how easy this came
together, and I had the basis for my personal light show running in less than
a day.
36 December 2012
After seeing the demos, I started thinking about what else I could make this LCD display do. So, I started
pulling out code I had written over the years and began
porting it to the Arduino Uno. First off was the
Mandelbrot set. While the code worked and the results
were beautiful, it took a full five minutes to generate
which was okay because I wasn't in a hurry. The long
generation time was not too surprising because the
Mandelbrot set requires a lot of floating point calculations
which are time consuming on any eight-bit processor.
Equally as pretty and in general less processor-intensive are the calculations of Julia sets. So, this is what I
tried next, and some of the images produced took my
breath away. I was starting to think this hardware
combination had some merit, so one thing lead to the
next and pretty soon I had about 16 different display
patterns running including: the Mandelbrot set, Julia sets,
plasma patterns, numerous spirograph patterns, star burst
patterns, concentric squares and circles, and much more.