Introduction: ArduinOLED

About: I enjoy making electronic games and other projects with the Arduino, Raspberry Pi, ATTINY, and more. https://jjv.sh/atinygame https://jjv.sh/about

ArduinOLED is a platform for electronic games and other projects. It includes an OLED screen, a joystick, some buttons, a buzzer, and alligator clip connection points to interface with many other devices. Visit https://johanv.xyz/ArduinOLED for more info.

This tutorial covers how to set up the software for the board. To learn how to order the parts and build the board, visit https://www.instructables.com/id/Build-the-ArduinOLED/

Step 1: Installing the Arduino IDE

Visit the Arduino Software Page and click on the link for your operating system.

I chose "Windows Installer", but if you don't have admin access, download the "Windows ZIP file for non admin install".

Click "Yes" when it asks you if the app should be allowed to make changes. Then click "Next" until the steps are done.

Step 2: Downloading the Libraries

You need three libraries to use the ArduinOLED: the U8g2 library, the DirectIO library, and the ArduinOLED library.

The U8g2 library

Open the Arduino IDE and click "Sketch", then "Include Library", then "Manage Libraries..."

Type "U8g2" in the search bar and click "Install".

After it installs, click "Close".

The DirectIO Library

The DirectIO library provides a faster way to set the I pins on the Arduino if the pin number is a constant. It is needed by the ArduinOLED library in the next step.

mmarchetti/DirectIO DirectIO - Fast, simple I/O library for Arduino GitHub

Go to the link above, click the "Clone or Download" button, then Click "Download ZIP".

Alternatively, click this link to download the ZIP file:

https://github.com/mmarchetti/DirectIO/archive/master.zip

Then, in the Arduino IDE, click "Sketch", "Include Library", then "Add .ZIP Library".

Navigate to the "Downloads" folder, select "DirectIO-master.zip" that you just downloaded, and click "Open".

The ArduinOLED Library

The ArduinOLED library was written by me specifically for this board. The setup is very similar to that of DirectIO in the previous step.

johanvandegriff/ArduinOLED Library for the ArduinOLED board. GitHub

Go to the link above, click the "Clone or Download" button, then Click "Download ZIP".

Alternatively, click this link to download the ZIP file:

https://github.com/johanvandegriff/ArduinOLED/archive/master.zip

Then, in the Arduino IDE, click "Sketch", "Include Library", then "Add .ZIP Library".

Navigate to the "Downloads" folder, select "ArduinOLED-master.zip" that you just downloaded, and click "Open".

Optional: Go to the Arduino libraries folder (Documents/Arduino/libraries) and rename "DirectIO-master" to "DirectIO" and "ArduinOLED-master" to "ArduinOLED".

Step 3: Plug in the Programmer Cable

Look at the back of the programmer and find the pin labelled "GND". Make a note of the pin color.

Then plug the cable into the middle 4 pins of the connector on the ArduinOLED board, making sure the color you made note of is on the side labeled "GND".

Finally, plug the USB end of the programmer cable into your computer.

Step 4: Uploading the Example Sketches

Click on "File", "Examples", "ArduinOLED", then "ArduinOLED_u8g2_StackerGame".

Click on "Tools", "Board", then "Arduino Pro or Pro Mini".

Click on "Tools", "Processor", then "ATmega328 (5V, 16MHz)".

Click on "Tools", "Port", then select the port that shows up when the cable is plugged in.

Hold down the button labelled "RST" on the ArduinOLED board.

Click the "Upload" button in the Arduino IDE.

When the status changes from "Compiling..." and "Uploading...", release the "RST" button.

Text should appear on the screen.

Congratulations! You did it!

You may notice that the highscore for the game is 255. To reset it, hold down the "R" button while the ArduinOLED powers up (either from the power switch or reset button). You will see a screen telling you that the highscore was reset.

Step 5: Next Steps