Task 1

For task 1, I implemented three different modes using the joystick, switch, and button with LEDs. (Mode 1) The switch swaps between LEDs, (mode 2) the button turns on and off an LED, and (mode 3) if both LEDs are on, then the joystick prints. The code for this is located in the repo below, in task1.py:

cpsc334/interactive-devices at master · sienacizdziel/cpsc334

Task 2

Creative Vision

For this art piece, my goal was to create something with a retro vibe. Ideally, I would be able to hook my Raspberry Pi up to a display screen to be able to pick my own retro color schemes, and the joystick naturally lent the idea of a sketching style of game, similar to an Etch-a-Sketch. The idea was that - because my device would be fairly rudimentary - an old arcade style would make the piece feel more complete.

Given the time and resource constraints, I thought it would be interesting to do a futuristic (through technology, using a computer) but arcade-style (through retro color scheme) take on an Etch-a-Sketch, with a few improvements. My piece would not only draw a continuous line, but also contain the functionality to change the color of the line and the mode of the screen (light or dark). When the mode of the screen is different, the color scheme of the line changes with it. This would add a new dimension to a traditional pencil sketch: color through interactivity. I wanted the light mode and dark mode to be independent, but build off one another into an abstract geometric-style art piece that is different for every person who interacts with it.

Software Design Considerations

I found a 5-inch touchscreen display in AKW. I wanted my piece to easily start, go full-screen, and end. To do this, I created a script on the Desktop of the Raspberry Pi (which automatically shows up on boot). To start the program, the user must double tap on the script, using the touchscreen feature of the display, and click “execute”. Then, the drawing will automatically fill the screen. To end the program, all you need to do is tap anywhere on the screen, and the program will end and return to Desktop. This would prevent an issue that I ran into, which was not being able to exit the program if it was in full-screen mode.

In my design process, I would use an ESP32 hooked up to a joystick to read and serial print the joystick values from analog to digital. My Raspberry Pi would then read this serial read this information to get joystick values. The Raspberry Pi is also connected to the button and switch, where are being read by a GPIO library in a Python script. Finally, I used the GUIzero Python library to make my own graphics on this piece; since this library loops through its code infinitely, I had to make a few changes in my task and lab code to remove my own loops (for example, listening for a button click through a while loop) in favor of GUIzero’s automatic callback functions.

How the wiring looks under the enclosure. The ESP32 is located inside a project box, while the raspberry pi is behind the display screen

How the wiring looks under the enclosure. The ESP32 is located inside a project box, while the raspberry pi is behind the display screen

Enclosure

I struggled a bit with creating an enclosure. I wanted my screen to be upright for a viewer, and needed to make sure to keep the joystick, button, and switch accessible. Importantly, the on/off switch must also be accessible to the user at the back of the installation (see the cord coming out of the enclosure). The back of the enclosure is open for ventilation purposes. Below is an image of the version 1 of my enclosure (shown in class on Thursday). I used foam and wooden sticks to make the structure sound, and draped cloth over the rest of the structure to hide the wiring and to add an additional color pop to the project.

VERSION 1: from the front, the display in dark mode

VERSION 1: from the front, the display in dark mode

After class on Thursday, I decided to upgrade my enclosure to make it more clean and improve the structural integrity. To do this, I separated some of the controls from the main console and also used cardboard for sturdiness. I kept some elements of cloth on the project to make it colorful. The back of the project is covered partially by cardboard, with an opening for ventilation purposes. The ESP32 is located inside of a project box to the left of the screen, and the Raspberry Pi is behind the display screen. Larger cables are housed underneath the display, and the rest of the wiring is inside the cardboard.

The back, which is open for ventilation and easy eaccess

The back, which is open for ventilation and easy eaccess

My project in light mode

My project in light mode

Usage

Retro Sketch is an interactive art piece designed as a colorful, retro-style sketching device. To boot up the device, plug it in and click the on button for the Raspberry Pi. Next, double tap on the interactive-art.sh file on the Desktop of the Raspberry Pi and click "execute". This will run the program in full screen.

To sketch, move the joystick. The button allows you to change the color of the line being created. Toggle the switch to switch between light and dark mode, which each have their own color schemes.