The fact i'm using the 1.3" display do i need to change something else? I am using this board because it is very famous and also because, I will post future tutorials using wifi communications. Can you tell me the exact error that it prints when you don’t add those lines?Hi Rui, I attached a video of the bug in my ssd1306.
on ESP8266 NodeMCU -Controling Adafruit SSD1306 OLED Display#define SCREEN_WIDTH 128 // OLED display width, in pixels#define SCREEN_HEIGHT 64 // OLED display height, in pixels// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) When comparing both Sketch the only difference are the following lines of code:Thanks for the heads up Sergio! So, just select File > Save output and then save it as text file. That’s it. This will generate binary bitmap image that has only two possible values for each pixel i.e.
Have you tried the difine screen lines in your ssd1306 ?, I have seen that playing with the WIDTH and HEIGHT 128/64 or 128/32 values can change the screen resolution. You may need to crop the image vertically or horizontally so that the image’s dimension is proportional to desired size (for instance 256x128px, 384x192px, etc. Are you using the same display as me?Hi Rui, I think my SSD1306 is not compatible with previous libraries. While I2C requires only two pins and can be shared with other I2C peripherals.
I attach photos of different options in my ssd1306.Actually I’ve never tried those resolutions parameters, because it worked just fine straight way. As an example, we have used our awesome GEEKERING image.To start with, open your image file in MS Paint and resize it to 128×64px by selecting Home > Resize > Pixels, as shown in figure 7. All you have to do now is to paste the bitmap array into your code.Alternatively, there’s an online application called image2cpp which can convert your image into an array (To see a video of the setup working, you can visit ourIf you enjoy our work, please consider a small donation to help our future open-source tutorials by clicking the image below:
At the heart of the module is a powerful single-chip CMOS OLED driver controller – SSD1306.
Therefore, we started by the power pins, connecting VCC pin to the 3.3V output on the NodeMCU and connect GND to ground. It can communicate with the microcontroller in multiple ways including SPI is generally faster than I2C but requires more I/O pins. I also increased the font size before, but never changed the height/width. If you had it open while you were changing the Adafruit_SSD1306.h file, restart it. I tried with Sketch example of Adafruit and if it works. I’ll let you know once I test the new version and see the results.Hello, I’ve just tried it myself today with the latest version of the Adafruit OLED Library and it compiles perfectly for me (the code that I have in the course).
#define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) In this tutorial, we will use the LCD assistant program, which is one of the simplest bitmap array generation programs. The Figure 2 diagram shows the result of the described connections.Before developing our code and in order to use the SSD1306 controller of the OLED, it is required to install the To install the library, navigate to the Sketch > Include Library > Manage Libraries… and then search for “adafruit ssd1306”.
It can also be played with display.setTextSize (1); or 2, to change size text according to the chosen resolution. Understanding the basic working principles of the SSD1306 and its usefulness, we can now begin to apply it in our projects. In the Sketch with this device I will have to include the lines:Thanks for letting me know and for sharing your display! Attached is the code I used taken from the example code.
To make this library work for our case, the display size must be changed in the Adafruit_SSD1306.h file, otherwise an error message saying Now, open the Adafruit_SSD1306.h file in a text editor and scroll down until the section with the SSD1306 Displays’ sizes. This weekend I’ll be double-checking that problem to see if the new update those lines are required. I think I have the same OLED, but I don’t have that error… Not sure what’s missing and why that happens with your setup.This Forum is private and it’s only available for members enrolled in our