Code: Alles auswählen
---------------
| RST BOOT |
3 0
4 1
5 2
6 21
7 20
8 3V3
9 GND
10 5V
---------------
USB
Code: Alles auswählen
---------------
| |
0 3
1 4
2 5
21 6
20 7
3V3 8
GND 9
5V 10
---------------
USB
Code: Alles auswählen
#include <Arduino.h>
#include <U8g2lib.h>
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif
#define SDA_PIN 5
#define SCL_PIN 6
U8G2_SSD1306_72X40_ER_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.42" OLED
void setup(void) {
Wire.begin(SDA_PIN, SCL_PIN);
u8g2.begin();
}
void loop(void) {
u8g2.clearBuffer();
u8g2.setFont(u8g2_font_ncenB08_tr);
u8g2.drawStr(0,10," 1 2 3 ...");
u8g2.sendBuffer();
delay(1000);
}
https://www.youtube.com/watch?v=-c8BDvaQDy4
und unter
https://github.com/01Space/ESP32-C3-0.42LCD
konnte ich eine Zip-Datei herunterladen mit dem Beispiel "hello-world.ino", lief auf Anhieb.