I have an SD1306 that I’m trying to use with my v3 seeeduino. I just can’t get the screen to turn on. And the program crashes whenever it reaches the init phase.
I have
SDA to analog 4
SCL Analog 5
VCC to 5V pin
GND to GND pin
I’m trying the adafruit library and also trying the ug82 lib. but I can’t get it to work. I know that the screens address is 0x3C.
this is the screen I have. SD1306 OLED
I’ve tried this program, with both types of inits.
#include <Arduino.h>
#include <U8g2lib.h>
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif
//U8G2_SSD1306_128X64_ALT0_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE); // SSD1306 and SSD1308Z are compatible
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); //Low spped I2C
void setup(void) {
u8g2.begin();
}
void loop(void) {
u8g2.clearBuffer(); // clear the internal memory
u8g2.setFont(u8g2_font_ncenB08_tr); // choose a suitable font
u8g2.drawStr(0,10,"Hello World!"); // write something to the internal memory
u8g2.sendBuffer(); // transfer internal memory to the display
delay(1000);
}