🔵 Elevate your DIY game with crisp, compact OLED brilliance!
This 0.96-inch blue OLED module features a 128x64 pixel resolution driven by the SSD1306 IC, utilizing a simple I2C interface with only two I/O pins. Compatible with popular platforms like Arduino, Raspberry Pi, MSP430, and STM32, it offers customizable IIC addressing and easy installation via four mounting holes, making it an ideal choice for professional-grade embedded projects.
C**Y
Great display
Works well with a little reading.I found that you DID NOT have to adjust the header file and only need to initialize the display with display.begin(SSD1306_SWITCHCAPVCC, 0x3C);Worked on both an Uno and a Mega.Uno PinoutSDA - A4SDL - A5GND - GNDVCC - 5vMega PinoutSDA - 20SDL - 21GND - GNDVCC - 5vThe example code for the SSD1306 really starts to push the memory of the Uno, but the Mega has no issue loading the program.Because it is an OLED, it will look dead until it has been initialized, which can be a bit confusing when you are first testing the screen. I thought I had a dud until I got it correctly initialized. Had no issues with 3.3v or 5v.Tested with a 30k Thermistor.#include <SPI.h>#include <Wire.h>#include <Adafruit_GFX.h>#include <Adafruit_SSD1306.h>#define OLED_RESET 4Adafruit_SSD1306 display(OLED_RESET);#if (SSD1306_LCDHEIGHT != 64)#error("Height incorrect, please fix Adafruit_SSD1306.h!");#endif#define THERMISTORPIN A0 // which analog pin to connect#define THERMISTORNOMINAL 30000 // resistance at 25 degrees C#define TEMPERATURENOMINAL 25 // temp. for nominal resistance (almost always 25 C)#define NUMSAMPLES 50 // how many samples to take and average, more takes longer#define BCOEFFICIENT 4400 // The beta coefficient of the thermistor (usually 3000-4000)#define SERIESRESISTOR 30000 // the value of the 'other' resistorint samples[NUMSAMPLES];void setup() {Serial.begin(9600);// connect AREF to 3.3V and use that as VCC, less noisy!analogReference(EXTERNAL);// by default, we'll generate the high voltage from the 3.3v line internally! (neat!)display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64)// init done// Show image buffer on the display hardware.// Since the buffer is intialized with an Adafruit splashscreen// internally, this will display the splashscreen.display.display();delay(250);// Clear the buffer.display.clearDisplay();}void loop() {uint8_t i;float average;float maxTemp;maxTemp = 0;// take N samples in a row, with a slight delayfor (i=0; i< NUMSAMPLES; i++) {samples[i] = analogRead(THERMISTORPIN);delay(10);}// average all the samples outaverage = 0;for (i=0; i< NUMSAMPLES; i++) {average += samples[i];}average /= NUMSAMPLES;display.clearDisplay();display.setTextSize(1);display.setTextColor(WHITE);display.setCursor(0,0);Serial.print("Analog ");Serial.println(average);display.print("Analog ");display.println(average);// convert the value to resistanceaverage = 1023 / average - 1;average = SERIESRESISTOR / average;Serial.print("R ");Serial.println(average);display.print("R-Val ");display.println(average);display.setTextSize(2);float steinhart;float fconvert;float convertValue;steinhart = average / THERMISTORNOMINAL; // (R/Ro)2steinhart = log(steinhart); // ln(R/Ro)steinhart /= BCOEFFICIENT; // 1/B * ln(R/Ro)steinhart += 1.0 / (TEMPERATURENOMINAL + 273.15); // + (1/To)steinhart = 1.0 / steinhart; // Invertsteinhart -= 273.15; // convert to CSerial.print(steinhart);Serial.println(" *C");fconvert = steinhart * 1.8;fconvert = fconvert + 32;Serial.print("Temperature ");display.println("A0 Temp");Serial.print(fconvert);Serial.println(" *F");display.print(steinhart);display.println(" *C");display.print(fconvert);display.println(" *F");display.display();delay(250);}
J**.
Great, inexpensive little display.
These are inexpensive and beautiful - I've used them in many projects. Note that the default address for arduino is 0x3C (7-bit. More Below).If left on constantly, there can be some "burn-in" manifested as the most-illuminated pixels becoming a bit dimmer, but A) they're inexpensive enough to replace occasionally B) still perfectly legible with burn-in.In response to some reviews questioning the resolution - I've ordered several and I can assure you they are all 128x64 - just make sure you Open the adafruit library and change the display definition to 128x64. The adafruit library works great with this display, but it's designed to work with their products, and the documentation is for their implementation. Make sure this line is uncommented, line 73 in Adafruit_SSD1306.h "#define SSD1306_128_64" there are three define lines for other sizes below, make sure those are commented out and you'll get a framebuffer that uses the whole display!As for the discrepancy with the address on the back, 0x78 in 8-bit is the same address in 0x3C in 7-bit. (0x78 in binary is 1111000, 0x3C is 111100 - the last bit of the address is the "read/write" bit, which most vendors feel should be omitted from the slave address specification, but some, for whatever reason, list the whole 8 bits. The arduino Wire library expects a 7-bit address. The full intricacies of i2c addressing are beyond the scope of an amazon comment, but I encourage you to dig deeper!)Note in the library "// Address for 128x64 is 0x3D (default) or 0x3C (if SA0 is grounded)" - so these boards are grounding the Select Address 0 pin on the SSD1306. You could change the address of the display, if you wanted to use two for example, by changing the position of that jumper with the address label (requires desoldering and resoldering). This would unground the SA0 pin and restore the chip to listening on it's default address. 0x7A, incidentally, is the 8 bit equivalency of the 7 bit address 0x3D.
Trustpilot
1 month ago
3 days ago