Arduino Blog #6 interfacing the oled 0.91 display

in blog •  last month

Hello Dear Makers!, This tutorial is an open source arduino project that teaches how to run Oled .91 i2c module to arduino microcontroller this project is very useful for school and indoor activities. you can also use this oled as clock display and notification display and many more.

20180424_205245_HDR.jpg

Gather all the Requirements

0.91 OLed Display
Arduino Microcontroller board
Type B usb cable
PC
Jumper wires

The i2c Oled display has 4 pins the 2 pins VCC is connected to 3.3V on the arduino some users uses 5V but for better resolution we will use 3,3v bcoz it doesnt eat a lot of power compare to the lcd the GND pin to GND on the arduino in any GND pin bcoz the arduino R3 supports 3 GND pin outputs. the data pins SCL and the SDA.

The Connection of Oled to Arduino

ff.png

Dowload the arduino Desktop IDE: https://www.arduino.cc/en/Main/Software
When the download is finished, un-zip it and open up the Arduino folder to confirm that click yes, there are some files and sub-folders inside. The file structure is important so don’t be moving any files around unless you really know what you’re doing.

Dowload the u8g library. This makes it easy to display graphic modes on OLED to make our project easy to create. beacause if we dont use library it takes days for us to program the oled on arduino.
download the library here: https://github.com/olikraus/u8g2

SKETCH CODE

#include <Arduino.h>
#include <U8g2lib.h>
#include <SPI.h>
#include <Wire.h>
U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0);
void setup(void) {
u8g2.begin();
}
void loop(void) {
u8g2.clearBuffer();
u8g2.setFont(u8g2_font_logisoso28_tr);
u8g2.drawStr(8,29,"STEEMIT");
u8g2.sendBuffer();
delay(4000);
u8g2.clearBuffer();
u8g2.setFont(u8g2_font_logisoso28_tr);
u8g2.drawStr(8,29," BUSY");
u8g2.sendBuffer();
delay(4000);
u8g2.clearBuffer();
//u8g2.setFont(u8g2_font_logisoso28_tr);
u8g2.setFont(u8g_font_unifont);
u8g2.drawStr(4,22,"STEEMMAKERS");
u8g2.sendBuffer();
delay(4000);
u8g2.clearBuffer();
//u8g2.setFont(u8g2_font_logisoso28_tr);
u8g2.setFont(u8g_font_unifont);
u8g2.drawStr( 0, 22, "@lapilipinas!");
u8g2.sendBuffer();
delay(4000);
}


Upload the sketch to your arduino then Test the oled it will show graphics functions for displaying text, in my code i use the words STEEMIT, BUSY, STEEMMAKERS, and my username lapilipinas

busy.png


stee.png


lap.png


f

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  Trending
Congratulations This post has been upvoted by SteemMakers. We are a community-based project that aims to support makers and DIYers on the blockchain in every way possible.

Join our Discord Channel to connect with us and nominate your own or somebody else's posts in our review channel.

Help us to reward you for making it ! Join our voting trail or delegate steem power to the community account.

Your post is also presented on the community website www.steemmakers.com where you can find other selected content.

If you like our work, please consider upvoting this comment to support the growth of our community. Thank you.