Hey Folks
I'm trying to power my esp32 project with a lithium battery. therefore I've 2000mAh 3,7 V and Battery Shield which boost the voltage to 5V
But the esp32 doesn't run with the battery - the red led on the esp32 is lighting - but the oled doesnt show anything. With usb connection to the pc every thing works fine.
- I've soldered the jumper on the Battery Shield to 1A and also charged the battery.
- 4,2 V directly at the battery and 5v from the pins
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
//mehr Infos: https://learn.adafruit.com/adafruit-gfx-graphics-library/graphics-primitives
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Fonts/FreeMonoBoldOblique12pt7b.h>
#include <Fonts/FreeSerif9pt7b.h>
Adafruit_SSD1306 display1(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
void setup() {
Serial.begin(115200);
display1.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display1.clearDisplay();
display1.setTextSize(2);
display1.setTextColor(WHITE);
display1.setCursor(5, 30);
display1.println("Loading...");
//x0,y0,width,height,color
display1.drawRect(0,0,128,64,SSD1306_WHITE);
display1.display();
delay(1000);
}
void loop(){
//alle 2 Sekunden wird der Text geändert
if(millis()%2000==0){
display1.clearDisplay();
display1.setTextColor(WHITE);
//1 Zeile
display1.setTextSize(1);
display1.setCursor(0, 5);
display1.println("my first display");
display1.display();
}
}
What do I miss here???
Thanks for you help