Introduction: Arduino Nano: Simple SSD1306 I2C OLED Analog Display With Visuino
OLED Displays are some of the coolest and most advanced modules that you can use in your Arduino project. They come in small form factor, and have very low power consumption while delivering bright vivid colors. Some of the cheapest and commonly available are the SSD1306 I2C and SPI OLED Modules. The I2C version needs only 2 control wires for the I2C, and this makes it perfect for Arduino projects leaving plenty of other pins available for other peripherals.
Step 1: Components
Step 2: Connect the SSD1306 OLED Display to Arduino
- Connect Female-Female wires - Power(Red wire), Ground(Black wire), SDA(Green wire), and SCL(Yellow wire) to the I2C SSD1306 OLED Display (Picture 1)
- Connect the other end of the Ground(Black wire) to the Ground pin of the Arduino board (Picture 2)
- Connect the other end of the Power(Red wire) to the 5V Power pin of the Arduino board (Picture 2)
- Connect the other end of the SDA wire(Green wire) to SDA/Analog pin 4 of the Arduino Nano board(Picture 2)
- Connect the other end of the SCL wire(Yellow wire) to SCL/Analog pin 5 of the Arduino Nano board(Picture 2)
- Picture 3 shows where are the Ground, 5V Power, SDA/Analog pin 4, and SCL/Analog pin 5 pins of the Arduino Nano
Step 3: Connect the Potentiometer to Arduino
- Connect a Female-Female Power wire(Orange wire) to the one end pin of the Potentiometer (Picture 1)
- Connect a Female-Female Signal wire(White wire) to the Wiper(center) pin of the Potentiometer (Picture 1)
- Connect a Female-Female Ground wire(Black wire) to the other end pin of the Potentiometer (Picture 1)
- Connect the other end of the Power wire(Orange wire) to the REF Analog Reference pin of the Arduino board (Picture 2)
- Connect the other end of the Signal wire(White wire) to the Analog pin 0 of the Arduino board (Picture 2)
- Connect the other end of the Ground wire(Black wire) to the Ground pin of the Arduino board (Picture 3)
- Picture 4 shows in Red the Arduino Nano pins that were connected in this step. The picture also shows the pins connected in Step 2 in Blue
Step 4: Start Visuino, and Select the Arduino Board Type
To start programming the Arduino, you will need to have the Arduino IDE installed from here: http://www.arduino.cc/.
Please be aware that there are some critical bugs in Arduino IDE 1.6.6.
Make sure that you install 1.6.7 or higher, otherwise this Instructable will not work!
Step 5: In Visuino: Add and Connect the SSD1306 OLED Display Component
We need to add component to control the OLED Display:
- Type "oled" in the Filter box of the Component Toolbox, then select the "SSD1306 OLED Display (I2C)" component (Picture 1), and drop it in the design area (Picture 2)
- In the Object Inspector, you may need to change the value of the "Address" property of the DisplaySSD13061 component (Picture 2) (See this Instructable to learn how you can scan the I2C bus to find the I2C Address of the Display)
- Connect the "Out" pin of the DisplaySSD13061 component to the "In" pin of the "I2C" channel of the Arduino component (Picture 2)
- Connect the "In" Input pin of the DisplaySSD13061 (Picture 3) to the "Out" output pin of the "Digital[ 14 ]/Avalog[ 0 ]" channel of the Arduino component (Picture 4)
Step 6: Generate, Compile, and Upload the Arduino Code
- In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE
- In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)
Step 7: And Play...
Congratulations! You have completed the project.
Picture 1 and the Video show the connected and powered up project. The Analog value of the Analog Pin 0 will start printing on the OLED Display as seen on the Video and Picture 2 .If you turn the Potentiometer the values will change.
We have a be nice policy.
Please be positive and constructive.