Introduction: Art Prompt Magnet

This is probably my first Arduino project and I wanted to start with something really small and simple using the Arduino Nano.

I wanted to start practicing more art this summer and I've always loved r/sketchdaily on reddit but have been wanting to avoid reddit a bit more cause I always tend to get carried away with other posts I find there.

I decided to make my own device that I could put a bunch of random prompts into to help me be able to have a good random Art prompt first thing in the morning when I'm getting food or water from my fridge.


This doesn't have to be a prompt for art only, It could be a prompt for a creative electronics project to try everyday, a short story or just words of encouragement.

Supplies


Step 1: Prototype

First, I try to use some clay to prototype what I want to make and what I want it to look like. I stick with Crayola Model magic cause it's my favorite and it never sticks to my components and is easy to get off.


The clay can be wrapped around the electronic components to give me a good idea of the size of the final build and also to figure out a good way to position them.

Step 2: Circuit Diagram

For this project, its a super diagram. Part of the reason I love these OLEDs is that the wiring is super simple since they use I2C communication protocol. In this case, all we have to do is connect the GND (ground) and VCC (Voltage In) pins on the OLED to the appropriate pins on the Arduino (GND and 5V) and the SDA and SCL pins on the OLED to the A4 and A5 pins on the Arduino

The circuit diagram above uses a 128x32 screen as an example because I couldn't find the 128x64 screen anywhere :(

The best tutorial I always use when getting started with these is in the link below.

https://randomnerdtutorials.com/guide-for-oled-display-with-arduino/

Step 3: Design

For Design I like to use TinkerCAD's electrical component shapes (in the Electronics shape library) because they give me a good idea of how big the components are and where to put them.

Its awesome because they have the exact components we need:

  1. Arduino NANO
  2. OLED 128x64 Display with I2C

So take those two components and we can build our box around them.

I use the project box shape under the Featured collections library. It has a setting that lets us switch between the lid and box. We will make sure they have the same width and length for the box and lid, then reshape cubes (and the components in subtract mode) to cut into the box where the display will fit and where our Arduino USB port will go.


Allowing a spot for the Arduino USB port is a good idea cause it allows us to program and reprogram the board whenever we want. so we could add new prompts or reuse the entire board and box for a different project in the future which I like a lot cause it lets me not waste money on new stuff.


The STL file is attached below



Step 4: Print

For Printing I used an Ender 3v2 with Orange PLA (my favorite). No supports needed or raft since the project box is nice and simple but make sure to have a file on hand to smooth some edges and file down some of the inside of the box if its too tight.

Step 5: Solder

For soldering, I soldered pin headers to the Arduino and pushed the Arduino with pin headers into a mini breadboard.

I love these little breadboards cause I can build projects around them and they allow components to fit snuggly inside project boxes if the box dimensions are built around the breadboards. They also allow me to reuse Arduinos quickly and do a lot of tinkering without needing to solder stuff to the Arduino.

Step 6: Assemble (the Avengers If Possible)

Assembly is super simple and because the box dimensions were built around the breadboard, I just slip the display into the box, fasten it with Sugru/Blutack then slip the cables and breadboard into the box. The breadboard fits snuggly inside the enclosure and holds the Arduino in place.

You can also use Sugru/Blutack or the modeling clay to help the Arduino and wires fit better inside if needed.

Then pop the stick on fridge magnets to the back of the enclosure once every is inside.

Step 7: Hello World

The OLED and Arduino are extremely easy to get setup. You will need to install the adafruit_SSD1306.h and the adafruit_GFX.h libraries. The libraries come with examples to get you started.

The code is a bit heavy but intuitive once if you have ever played with graphing libraries like python turtles. Essentially, we will tell the program the dimensions of our screen, draw pixels or text and clear the display before and after drawing. We can also tell it what size of text we want as well as other customization options.


The simple code for the Hello World Tutorial is attached to this step.


I will again link the tutorial I learnt this from below:


https://randomnerdtutorials.com/guide-for-oled-display-with-arduino/

Step 8: Hello Prompts

I made a list of 31 (hopefully to last a month) prompts to go into the program separated by commas.

The code I made is just a remix of the 'Hello World' program above except that it restarts every day and picks a random prompt to display.


Something interesting though is that if we used the traditional random selection process, we not actually get 'true' random. Instead every time we restart the Arduino, we would get the same sequence of prompt choices because random for computers is not truly random.

The solution of course is to tell the program to assign a random seed each time it starts.


The other problem to be aware of is that the Arduino Nano only has 30720 bytes to store our program. The program in the code I used took about 48% of the total bytes with 31 short words but changing the number of words or their length could easily take up more memory so make your list carefully keeping that in mind.

The code is attached below.

Step 9: Finished

So to finish the project, just add some stick on magnets to the back of the prompter and it should be light enough to stay on the fridge or above the fridge white board (that I know you have) incase it needs some support.


Of course the project could be improved by adding a battery, button to reset manually for a new prompt and I will be trying those out as I go.


But for a first official Arduino project, I gotta admit, it was really fun (ノ◕ヮ◕)ノ*:・゚✧

Magnets Contest

Participated in the
Magnets Contest