Place to put your Basic demos and examples

Moderator: Mmiscool

User avatar
By AusUser
#62340 Thanks for your post. The i2c scanner has confirmed the address is 0x3c for the oled. And using the wire libiary i've set

Code: Select all // Initialize the OLED display using Wire library
 SSD1306  display(0x3c, D2, D1);


From the IDE I've run the SSD1306DrawingDemo and the display is garbled, I can make our the word "working" though.
User avatar
By trackerj
#62348 Simplest OLED Display test code:

Code: Select alllet v = 100
i2c.setup(4,5)
lcdbl 1
oledcls
oledprint "Hello", 0, 0
oledprint v, 3, 3
wait


Assumptions:
- SDA, SCL = GPIO4,5
- Proper I2C pull-up resistors
- i2cscanner() detects properly the OLED Display, etc,etc
User avatar
By AusUser
#62426 Thanks for you reply. Using the SSD1306SimpleDemo and setting

Code: Select all#include "SH1106.h" // alias for `#include "SSD1306Wire.h"`


and

Code: Select all// Initialize the OLED display using Wire library
// SSD1306  display(0x3c, D3, D5);
SH1106 display(0x3c, D2, D1);


I was able to confirm it was working.