Created
July 8, 2018 20:41
-
-
Save bartoszbielawski/bf9a03d6eb505b299c7fd6a8b641021c to your computer and use it in GitHub Desktop.
ESP32 + I2C OLED Display causing problems...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Espressif 32 v 1.1.2 | |
Display library: https://github.com/adafruit/Adafruit_SSD1306.git | |
Board: Heltec Wifi32 | |
*/ | |
#include <Arduino.h> | |
#include <Adafruit_SSD1306.h> | |
#include <Wire.h> | |
void displayThread(void*) | |
{ | |
Wire.begin(4,15); | |
Adafruit_SSD1306 display(16); | |
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64) | |
display.setTextColor(WHITE); | |
display.setTextSize(1); | |
display.setFont(); | |
int x = 0; | |
while (true) | |
{ | |
display.clearDisplay(); | |
display.setCursor(50, 50); | |
display.printf("%d", x++); | |
display.display(); | |
Serial.printf("%d\n", x); | |
delay(1); | |
} | |
} | |
void setup() | |
{ | |
Serial.begin(115200); | |
xTaskCreate(displayThread, "DT", 8192, NULL, 5, NULL); | |
} | |
void loop() { | |
delay(1); | |
} | |
/***** | |
The output: | |
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
[E][esp32-hal-i2c.c:594] i2c_isr_handler_default(): eject int=0x0, ena=0x0 | |
10 | |
11 | |
[E][esp32-hal-i2c.c:594] i2c_isr_handler_default(): eject int=0x0, ena=0x0 | |
12 | |
[E][esp32-hal-i2c.c:594] i2c_isr_handler_default(): eject int=0x0, ena=0x0 | |
13 | |
14 | |
15 | |
[E][esp32-hal-i2c.c:594] i2c_isr_handler_default(): eject int=0x0, ena=0x0 | |
16 | |
[E][esp32-hal-i2c.c:594] i2c_isr_handler_default(): eject int=0x0, ena=0x0 | |
17 | |
******/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment