Custom Menu Options Using Adafruit SSD1306 SPI Display and Arduino

by Nandxor in Circuits > Arduino

3117 Views, 5 Favorites, 0 Comments

Custom Menu Options Using Adafruit SSD1306 SPI Display and Arduino

IMG_0884.jpg

I had this display sitting in my IOT box for a while now and today I decided to play around with it.

I came up with an idea to create a custom menu which can be used in all sort of electronic devices.

Parts

1 x Breadboard or PCB

Couple of jumper wires

4 x SPST switches

4 x 10 kOhm resistors

1 x Arduino board (I've used UNO, but each one will do the job)

1 x Adafruit SSD1306 SPI display (Mine is not an original one. I've bought it from Aliexpress and I assume most SPI displays will work with their library)

Software

You will need the latest Arduino IDE found here -> https://www.arduino.cc/en/software

Adafruit 1306 library -> https://github.com/adafruit/Adafruit_SSD1306

Connections

Display

  • Display pin MOSI to Arduino pin 9
  • Display pin CLK to Arduino pin 10
  • Display pin DC to Arduino pin 11
  • Display pin CS to Arduino pin 12
  • Display pin RST to Arduino pin 13

Buttons

  • UP button to Arduino pin 3
  • DOWN button to Arduino pin 2
  • ENTER button to Arduino pin 4
  • BACK button to Arduino pin 5

Pull-down resistors

You must tie each Arduino pin to GND with 10kOhm resistor in order for pin to be digital LOW while button is not pressed.

Code

Here is the full source code.

Please reach out if you need any assistance or detailed explanation.

Preview

Custom menu using Adafruit SSD1603 SPI display