diff --git a/README.md b/README.md index 9516d09..b62964b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # Minuteur -Basé sur un ESP32-CAM, pour interrompre une alimentation USB. -Temps réglable, 2 ou 3 boutons poussoirs, mini afficheur oled. +Basé sur un ESP32-CAM, pour interrompre une alimentation USB (via transistor ou relais ?). + +Temps réglable (MM:SS), boutons poussoirs ou encodeur rotatif, mini afficheur oled. + +## Schéma de principe +![principe](./doc/schema_principe.jpg) diff --git a/doc/schema_principe.jpg b/doc/schema_principe.jpg new file mode 100644 index 0000000..ea7a5b5 Binary files /dev/null and b/doc/schema_principe.jpg differ diff --git a/src/main.cpp b/src/main.cpp index bbedf28..1fd63f4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,6 +7,7 @@ OLED myOLED(SDA, SCL); extern uint8_t BigNumbers[]; +extern uint8_t SmallFont[]; #define SORTIE_ALIM 4 #define LED_FLASH 4 @@ -22,10 +23,11 @@ void setup() { digitalWrite(SORTIE_ALIM, LOW); myOLED.begin(SSD1306_128X32); - myOLED.setFont(BigNumbers); + myOLED.setFont(SmallFont); myOLED.clrScr(); - myOLED.print("Hello, world!", CENTER, 0); + myOLED.print("Hello", CENTER, 0); myOLED.update(); + delay(1000); } @@ -36,12 +38,18 @@ void loop() { { char cstr[16]; itoa(i, cstr, 10); - + + myOLED.setFont(BigNumbers); myOLED.clrScr(); myOLED.print(cstr, CENTER, 0); myOLED.update(); delay(1000); } + + myOLED.setFont(SmallFont); + myOLED.clrScr(); + myOLED.print("OFF", CENTER, 0); + myOLED.update(); digitalWrite(SORTIE_ALIM, LOW); delay(1000); } \ No newline at end of file