-

CommentStreams:31b91351cae0c73c2be22a3282bde777

From Geekworm Wiki
< CommentStreams:Ba45d60d4bcd4f0e3be40f4a9863912a
Revision as of 12:56, 28 November 2023 by 73.162.65.105 (talk) (Migrated reply #4139)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Ok, I figured it out.


Get library + example file


Arduino IDE >> Tools >> Library Manager >> SSD1306 >> Install

Arduino IDE >> File >> Examples >> Adafruit SSD1306 >> ssd1306_128x64_i2c


alter definitions:


// on this board the address is not 0xDC, it is 0x3C

  1. define SCREEN_ADDRESS 0x3C

alter setup function:


void setup() {

 //
 // EXISTING_CODE
 //
   Serial.begin(9600);
 //
   // NEW_CODE
 //
 // Wire.h defaults are: SDA: 4, SCL: 5
   //    but we must reverse it for this board:
   //        pin 5 SDA (this board)
   //        pin 4 SCL (this board)
   Wire.begin(5, 4);