oled lcd display arduino factory

This article shows how to use the SSD1306 0.96 inch I2C OLED display with the Arduino. We’ll show you some features of the OLED display, how to connect it to the Arduino board, and how to write text, draw shapes and display bitmap images. Lastly, we’ll build a project example that displays temperature and humidity readings.
The organic light-emitting diode(OLED) display that we’ll use in this tutorial is the SSD1306 model: a monocolor, 0.96-inch display with 128×64 pixels as shown in the following figure.
The OLED display doesn’t require backlight, which results in a very nice contrast in dark environments. Additionally, its pixels consume energy only when they are on, so the OLED display consumes less power when compared with other displays.
The model we’re using here has only four pins and communicates with the Arduino using I2C communication protocol. There are models that come with an extra RESET pin. There are also other OLED displays that communicate using SPI communication.
Because the OLED display uses I2C communication protocol, wiring is very simple. You just need to connect to the Arduino Uno I2C pins as shown in the table below.
To control the OLED display you need the adafruit_SSD1306.h and the adafruit_GFX.h libraries. Follow the next instructions to install those libraries.
After wiring the OLED display to the Arduino and installing all required libraries, you can use one example from the library to see if everything is working properly.
This is an example for our Monochrome OLEDs based on SSD1306 drivers. Pick one up today in the adafruit shop! ------> http://www.adafruit.com/category/63_98
The Adafruit library for the OLED display comes with several functions to write text. In this section, you’ll learn how to write and scroll text using the library functions.
First, you need to import the necessary libraries. The Wire library to use I2C and the Adafruit libraries to write to the display: Adafruit_GFX and Adafruit_SSD1306.
Then, you define your OLED width and height. In this example, we’re using a 128×64 OLED display. If you’re using other sizes, you can change that in the SCREEN_WIDTH, and SCREEN_HEIGHT variables.
The (-1) parameter means that your OLED display doesn’t have a RESET pin. If your OLED display does have a RESET pin, it should be connected to a GPIO. In that case, you should pass the GPIO number as a parameter.
To draw a pixel in the OLED display, you can use the drawPixel(x, y, color) method that accepts as arguments the x and y coordinates where the pixel appears, and color. For example:
The library also provides methods to displays rectangles with round corners: drawRoundRect() and fillRoundRect(). These methods accepts the same arguments as previous methods plus the radius of the corner. For example:
The library provides an additional method that you can use with shapes or text: the invertDisplay() method. Pass true as argument to invert the colors of the screen or false to get back to the original colors.
Copy your array to the sketch. Then, to display the array, use the drawBitmap() method that accepts the following arguments (x, y, image array, image width, image height, rotation). The (x, y) coordinates define where the image starts to be displayed.
In this section we’ll build a project that displays temperature and humidity readings on the OLED display. We’ll get temperature and humidity using the DHT11 temperature and humidity sensor. If you’re not familiar with the DHT11 sensor, read the following article:
The code starts by including the necessary libraries. The Wire, Adafruit_GFX and Adafruit_SSD1306 are used to interface with the OLED display. The Adafruit_Sensor and the DHT libraries are used to interface with the DHT22 or DHT11 sensors.
The (-1) parameter means that your OLED display doesn’t have a RESET pin. If your OLED display does have a RESET pin, it should be connected to a GPIO. In that case, you should pass the GPIO number as a parameter.
In this case, the address of the OLED display we’re using is 0x3C. If this address doesn’t work, you can run an I2C scanner sketch to find your OLED address. You can find the I2C scanner sketch here.
We use the setTextSize() method to define the font size, the setCursor() sets where the text should start being displayed and the print() method is used to write something on the display.
After wiring the circuit and uploading the code, the OLED display shows the temperature and humidity readings. The sensor readings are updated every five seconds.
The I2C address for the OLED display we are using is 0x3C. However, yours may be different. So, make sure you check your display I2C address using an I2C scanner sketch.
The OLED display provides an easy and inexpensive way to display text or graphics using an Arduino. We hope you’ve found this guide and the project example useful.

In this article we look at the tiny 0.49″ 64×32 graphic OLED from PMD Way. It is a compact and useful display, that only requires a small amount of time to get working with your Arduino or compatible board.
The purpose of this guide is to get your display successfully operating with your Arduino, so you can move forward and experiment and explore further types of operation with the display.
I2C pinouts vary for other boards. Arduino Leonard uses D2/D3 for SDA and SCL or the separate pins to the left of D13. Arduino Mega uses D20/D21 for SDA and SCL. If you can’t find your I2C pins on other boards, email admin at tronixstuff dot com for assistance.
To install the library – simply open the Arduino IDE and select Manage Libraries… from the Toolsmenu. Enter “u8g2” in the search box, and after a moment it should appear in the results as shown in the image below. Click on the library then click “Install”:
Now it’s time for you to explore the library reference guide which explains all the various functions available to create text and graphics on the display, as well as the fonts and so on. These can all be found on the right-hand side of the driver wiki page.

There are a number of options for displaying text or graphics in your project. LEDs and LCDs are the traditional choices but in recent years another type of display has been getting a lot of attention – the OLED.
OLED’s are used in display applications large and small, from giant television screens to tiny smartwatch displays. They are bright, easy to see in a variety of lighting conditions and they consume very little current.
OLED is an abbreviation for “Organic Light Emitting Diode” which would seem to indicate that these devices are somehow related to traditional LED’s but differ in the sense that they are “organic”. This is actually true on both accounts.
The “organic” in OLED refers to the organic molecules used in creating these devices. Organic molecules are simply molecules that are based around lines or rings of carbon atoms. Examples of organic molecules include common items such as sugar, gasoline, alcohol, wood, and plastics.
Kodak was also the first company to release a commercial device using OLEDs. Its EasyShare LS633 camera was released in March 2003 and used an OLED display screen.
OLEDs have a very wide field of view, approaching 170 degrees. This allows users to enjoy the video display without needing to sit directly in front of it.
Early OLED displays had lifespan problems. This has been improved, however blue OLEDs still have a shorter life expectancy than their traditional LED equivalents.
Currently, OLEDs are more expensive to manufacture. This will likely change as more factories produce them. Eventually, they will rival or beat LCDs in value, but right now they are more expensive.
Transparent OLEDs can be made up to 85% as transparent as their substrate (the material they are printed on) is. This will improve and has a lot of potential for heads-up displays.
Foldable OLEDs are perhaps the most intriguing of them all. These OLEDs have already been used in curved video displays and will find a lot of use in the design of phones with bendable screens.
But the real exciting aspect of foldable OLEDs is that they can be printed onto cloth. This creates the possibility of a new generation of wearable electronics. Imagine a t-shirt that is also a video display.
So now that we know a bit about OLEDs how do we get one connected to an Arduino and start displaying wonderful things? There are actually a couple of ways.
OLED displays typically come with either an SPI or an I2C interface. Some even have both interfaces, one of the ones we will look at today works like that.
To display data on an OLED you will first load it into the OLED buffer and then give it a command to write to the display. There are several libraries available for the Arduino that will simplify this, I’ll be showing you one from Adafruit that is very versatile.
As the OLED display is really a matrix of OLEDs you’ll need to address them individually to control them. The Adafruit library simplifies this, as do the other OLED libraries.
We will start by working with a couple of very common I2C OLED displays. These displays are based on the SSD1306 OLED driver chip so they can use the same software libraries.
One of my displays is 128×32. It is a very simple I2C display with no provision for changing its I2C address. Mine came configured for I2C address 0x3C, which is probably the most common OLED address.
The second display is 128×64, twice as many lines as the first one. It is actually a bicolor display, the top 16 pixels are yellow and the bottom 32 are blue. This type of display is often used as an indicator for devices like FM radios and MP3 players.
The larger display has the same connections as its smaller counterpart, it also has provisions for changing its I2C address. The address change involves moving a surface-mount resistor from one set of solder pads to another. Not quite as simple as using a jumper wire or solder bridge!
The instructions that follow should work with any sized OLED based upon the SSD1306 OLED driver chip. Make sure you check your I2C address as it may not be the same as the one I used, you can just change it in the sketches.
As long as you keep your OLED and Arduino reasonably close you should just be able to connect them directly without any other components. If you experience errors try adding pull-up resistors, I didn’t find that to be necessary myself.
The power and ground connections to the display are pretty obvious. Most of these displays have an onboard regulator to supply power to the OLEDs and to the “charge pump” used to drive them.
TheSCLconnection goes to Arduino pinA4. TheSCLconnection goes toA5. If your Arduino Uno has a separate set of SDA and SCK connections (usually located near theAREFpin) you can use those instead, they are actually the same connection.
Adafruit SSD1306– The library for the SSD1306 monochrome OLED display. It was originally designed for an Adafruit-specific display but has been enhanced to work with any display based upon the SSD1306 driver chip.
Both Adafruit libraries are available at GitHub, but it is much easier to install them using the Library Manager in the Arduino IDE. You can do that as follows:
One thing to note is that you should check your I2C address and adjust the sketch to match. The 64 line sketch has a different I2C address, I had to change it to run on my display.
For fun, I connected two 32 Line displays up to the Arduino, by running them in parallel on the I2C bus. Normally you would never connect two I2C devices with the same address onto one I2C bus but in this case, it actually works.
It works because displays only receive data, they don’t return any to the host Arduino. Both displays have the same address so they simply respond to the data for that address.
The Waveshare 1.5 inch display module is a monochrome 128 x 128 OLED display that can use either an I2C or SPI interface. Connections can be made to the module using an included cable that mates with a connector on the module itself. There are also holes for header pins to make the same connections if you prefer.
I used the supplied cable to hook up the OLED display to my Arduino, you can also solder header pins to the module and plug it into a breadboard if you prefer. Either way the connections are the same, as follows:
You can’t use the Adafruit demos with this display, even when wired in SPI mode. The Waveshare 1.5 inch OLED display uses the SSD1327 driver, which is a different beast than the SSD1306 driver used in the I2C displays we looked at previously.
I visited theWaveshare Wiki for the 1.5 inch OLED Moduleto get some sample software. They sent me to the (amusingly misspelled)1.5inch OLED Moudle download page. I downloaded and unzipped the file.
Without adding extra memory to your Arduino you can’t really do any animation on the display as there won’t be enough memory to hold the display buffer – remember, this is a 128 x 128 display. But as I don’t really want to add extra RAM to my Arduino Uno I restricted myself to the ”internal memory” sketch.
You’ll need to locate your Arduino sketchbook folder, the one that holds the Arduino sketches from the Arduino IDE on your computer. Locate and open that folder, it’s probably calledArduino.
If your Arduino libraries folder does not already have aFontsfolder just copy the whole folder in. If there is already aFontsfolder then copy just the contents of the WaveshareFontsfolder into the existing folder.
Open theINT_RAMfolder in the WaveshareArduinofolder. You’ll see another folder calledOLED_Show. Copy this entire folder to yourArduinofolder on your local computer.
Open theOLED_Showfolder. You’ll see a number of files, including a sketch calledOLED_Show.ino. This is the demo sketch, you can open it with your Arduino IDE.
When you compile and upload the sketch you may get a message warning you about low memory on the Arduino. Just accept the message, the sketch leaves very little free memory as it uses most of it to load the display buffer.
The demo displays a fake “clock” along with a number of graphic symbols and some text. It will give you an idea of what kind of characters you can display and how they will look.
If you want to see some animated demos using this display you are probably better off running the code included for the Raspberry Pi, as this won’t have the memory limitations the Arduino code does.
The previous examples will help you get your OLED display setup and ensure that it is working. They can also be used as starting points for your own sketch to control the OLED display.
But they can also be a bit overwhelming. Because they contain a lot of graphics and animation coding to show off the display the demo scripts are also rather complex. And that makes it a bit more difficult for a beginner to figure out how to control their display.
In order to make it easier for you to get started with OLED displays, I’ve created a very simple project that you can build that uses simple code to display text.
Since both the AM2320 and OLED display are I2C devices the wiring of our OLED temperature and humidity meter couldn’t be easier. Here is the hookup diagram.
Here is the sketch for the OLED Temperature and Humidity Meter. If you need a copy of it make sure to check out the Resources section at the end of this article where you will find a link to download it.
In order to run this sketch, you’ll need to install more libraries to work with the AM2320 (I will assume you installed the two Adafruit libraries we discussed earlier as you need those too). Again these will be installed from the Library Manager in your Arduino IDE, using the same procedure you followed when installing the OLED libraries earlier.
Now onto the sketch. It starts by loading all of the libraries we just spoke of, along with theArduino Wire Libraryto communicate via I2C. Note that the Graphics library has been included but isn’t really being used in this sketch, you can omit the include statement for it if you wish.
We then setup an object calleddisplay that represents our OLED display. Note that the original Adafruit OLED tha the library was written for used a Reset pin that still needs to be defined, even if it isn’t used.
Note that the initialization line for the OLED specifies its I2C address. If you are using an OLED with a different address you will need to change that.
Now we work with the OLED display. Keep in mind that when you work with an OLED you are first setting up your data in a display buffer, after which you issue a command to display the buffer contents.
Next, we set the display color. As we are using a monochrome display we always useWHITE. It doesn’t matter what color your display actually is (mine is yellow and blue but I still useWHITEfor both). Color values don’t really come into play until you work with RGB OLEDs.
We then move the cursor down and print the word “Humidity:” followed by some spaces – the spaces are a crude attempt at lining up the display! We then print the actual humidity value from the float, followed by a space and a percentage symbol.
The project worked perfectly the first time I tried it. You’ll notice some gibberish on the display when it is first fired up, this will clear in two seconds when the first readings are displayed.
The cost of OLEDs is continually falling and it won’t be too long before they rival LCDs in price. They don’t need a backlight and they are visible in all types of lighting environments.
I’m planning to start experimenting with RGB OLED displays next, so if you enjoyed this article and video keep your eyes open for an article about color OLEDs soon.
OLED displays are bright, lightweight and easy to read in almost any lighting environment. In this article, you"ll learn how OLEDs differ from regular LEDs and LCDs and how to use them with an Arduino.

※Price Increase NotificationThe TFT glass cell makers such as Tianma,Hanstar,BOE,Innolux has reduced or stopped the production of small and medium-sized tft glass cell from August-2020 due to the low profit and focus on the size of LCD TV,Tablet PC and Smart Phone .It results the glass cell price in the market is extremely high,and the same situation happens in IC industry.We deeply regret that rapidly rising costs for glass cell and controller IC necessitate our raising the price of tft display.We have made every attempt to avoid the increase, we could accept no profit from the beginning,but the price is going up frequently ,we"re now losing a lot of money. We have no choice if we want to survive. There is no certain answer for when the price would go back to the normal.We guess it will take at least 6 months until these glass cell and semiconductor manufacturing companies recover the production schedule. (May-11-2021)
ER-OLED032-1W is the graphic OLED display module made of 256x64 individual white OLED pixels,diagonal is only 3.2 inch.The controller ic SSD1322, communicates via 6800/8080 8-bit parallel and 3-wire/4-wire serial interface. Because the display makes its own light, no backlight is required. This reduces the power required to run the OLED and is why the display has such high contrast,extremely wide viewing angle and extremely operating temperature.The fpc is the connector type,we offer optional zif connector(fpc connector).
It"s easily controlled by MCU such as 8051,PIC,AVR,ARDUINO,ARM and Raspberry Pi.It can be used in any embedded systems,industrial device,security,medical and hand-held device.

Orient Display is a company that specializes in manufacturing OLED modules with competitive prices. The company was founded in 1996 by specializing in fields of production, R&D, quality controls. Thanks for the management and employee’s continuous hardworking and enormous effort and shareholder continuous investment over years, Orient Display factory is now the world’s lead standard and customOLED display module manufacturer in flat panel industry and is listed as a public company in China stock market. Now, Factories have complete quality and environment management system, ISO9001, ISO/IATF16949, ISO14001, IECQ QC080000. It is also No.1 in the world for automotive capacitive touch screen which took around 18% market share in the world automotive market.
Orient Display develops a line of products for customer to buy Arduino OLED display modules to have hands on experience. They range from 0.66”, 0.68”, 0.83”, 0.95”,0.96”, 1.09”, 1.3”, 1.54”, with resolution 64×48, 96×32, 96×39, 96×64, 96×96, 128×64. The interfaces have the options of 6800,8080 parallel, 3 or 4 wire SPI, I2C and RGB interface. 3.3V power supply, extremely wide viewing angle and extremely operating temperature. It’s through hole connection by default. Our standard OLED products colors have yellow, blue, white and full color, but we have a lot of other sizes, resolutions and colors to choose available either as standard or custom OLED panel display solutions. Orient Display doesn’t have touch panel available in our standard OLED display products but custom made RTP or CTP are welcome and we also provide integration solution for our customers. It’s easily controlled by MCU such as 8051, PIC, AVR, ARDUINO, ARM and Raspberry Pi. It can be used in any embedded systems, industrial device, security, medical and hand-held device.
Fast Response Speed: OLED display response times are around 1,000 times faster than LCD displays; it is around 10 0 μs (0.01 ms). While LCD displays perform poorly at low temperature which has no effect on OLED display performance.
Greater Contrast: LCD displays need backlight to be seen which makes some light leaking to cause losing contrast, while OLED displays are true black for background to create superior contrast.
Wider Viewing Angles: LCD displays have genetic drawback of using rubbing process in manufacturing which makes the viewing angle narrower, while OLED displays don’t have such an issue.
Thinner and Lighter in Weight: LCD displays need backlight to light up. The backlight has light guide, diffuser, reflector, BEF, PCB for LED chips etc. which LCD displays difficult to be very thin. OLED screen panel emits light itself which makes it lighter and thinner.
Power Consumption: Again, an LCD screen needs backlight to make it work. The backlight has to light the whole LCD panel even in the sleep mode or only a small fraction of the display to be used, such as showing only time on the cell. Phone. Even with quantum dots backlight technology development, it is still very expensive to use, while OLED can just display part of the pixels selectively to save power.
If you have any questions about Orient Display OLED display panels and OLED display modules. Please feel free to contact: Sales Inquiries, Customer Service or Technical Support.

The CFAL5016A-Y is a versatile graphic OLED display module designed to fit the same display opening and mounting holes as the CFAH0802A series of character LCD display modules. If you are planning a design refresh and you are currently using one of our CFAH0802A series of LCD display modules, with a very small modification to your PCB layout you can add a 50x16 pixel graphic OLED display module to your design without changing the enclosure for your product!
The CFAL5016A-Y graphic OLED display module has a very high contrast ratio (2000:1) with an extremely dark background versus the lit-up pixels on the display. This will really make the information or graphics you"re displaying pop, drawing the attention that your product deserves. This display module features a viewing cone in excess of 160° and is able to communicate using either an 8 or 4-bit parallel microcontroller interface. Because the CFAL5016A-Y only powers the pixels that are necessary, as opposed to backlighting the entire display all the time, there can be significant power savings when used with sparse display content. Like all of our display offerings, the CFAL5016A-Y is REACH/RoHS compliant, so adding the CFAL5016A-Y won"t cause you any difficulties when shipping to the European Union or other areas which hold to those rules.

NHD-1.27-AU-SHIELD | Arduino Shield with OLED Display | 128x96 Pixels | 262K Full Color | Serial Interface | Built-in Logic Level Shifting for 3.3V & 5V Operation
Engineered in Elgin IL USA, we designed this Arduino shield with our 1.27" full color graphic OLED display. This shield comes with a serial interface OLED display module that has a single row pinout designed for easy breadboarding, supports video, and has all the great features of the graphic OLED. They are not limited to just Arduino boards, with their single row pinout, they can easily be used with any existing development board. The shield has built-in logic level shifting for 3.3V and 5V operation in order to support a broader range of end products. It has open source hardware and software to save engineers time and money. It also comes equipped with a microSD card slot allowing addional storage space for more complex code, eliminating any memory contraints of the Arduino board. For interchangeable development, all three sizes of our color OLED modules (1.27", 1.5" and 1.69") share the same pinout.
Easily modify any connectors on your display to meet your application’s requirements. Our engineers are able to perform soldering for pin headers, boxed headers, right angle headers, and any other connectors your display may require.
Choose from a wide selection of interface options or talk to our experts to select the best one for your project. We can incorporate HDMI, USB, SPI, VGA and more into your display to achieve your design goals.

Our new 1.12” OLED displays are perfect when you need a small display with 16 grayscale. The visible portion of the OLED measures 1.12” diagonal and contains 96x96(version 1.0) | 128x128(version 2.0) grayscale pixels. Because the display uses OLEDs, there is no backlight, and the contrast is very high.
This OLED uses the SSD1327(V1.0) or SH1107G(V2.1) driver chip, which manages the display. You can talk to the driver chip using 4-wire I2C (clock, data, power, and GND pins).
The platforms mentioned above as supported is/are an indication of the module"s software or theoritical compatibility. We only provide software library or code examples for Arduino platform in most cases. It is not possible to provide software library / demo code for all possible MCU platforms. Hence, users have to write their own software library.
Ms.Josey
Ms.Josey