doc : ajout schéma

This commit is contained in:
Laurent Claude 2023-09-02 20:12:26 +02:00
parent d3ee50d2ec
commit b62acfc56e
3 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,7 @@
# Minuteur # Minuteur
Basé sur un ESP32-CAM, pour interrompre une alimentation USB. Basé sur un ESP32-CAM, pour interrompre une alimentation USB (via transistor ou relais ?).
Temps réglable, 2 ou 3 boutons poussoirs, mini afficheur oled.
Temps réglable (MM:SS), boutons poussoirs ou encodeur rotatif, mini afficheur oled.
## Schéma de principe
![principe](./doc/schema_principe.jpg)

BIN
doc/schema_principe.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@ -7,6 +7,7 @@
OLED myOLED(SDA, SCL); OLED myOLED(SDA, SCL);
extern uint8_t BigNumbers[]; extern uint8_t BigNumbers[];
extern uint8_t SmallFont[];
#define SORTIE_ALIM 4 #define SORTIE_ALIM 4
#define LED_FLASH 4 #define LED_FLASH 4
@ -22,10 +23,11 @@ void setup() {
digitalWrite(SORTIE_ALIM, LOW); digitalWrite(SORTIE_ALIM, LOW);
myOLED.begin(SSD1306_128X32); myOLED.begin(SSD1306_128X32);
myOLED.setFont(BigNumbers); myOLED.setFont(SmallFont);
myOLED.clrScr(); myOLED.clrScr();
myOLED.print("Hello, world!", CENTER, 0); myOLED.print("Hello", CENTER, 0);
myOLED.update(); myOLED.update();
delay(1000);
} }
@ -37,11 +39,17 @@ void loop() {
char cstr[16]; char cstr[16];
itoa(i, cstr, 10); itoa(i, cstr, 10);
myOLED.setFont(BigNumbers);
myOLED.clrScr(); myOLED.clrScr();
myOLED.print(cstr, CENTER, 0); myOLED.print(cstr, CENTER, 0);
myOLED.update(); myOLED.update();
delay(1000); delay(1000);
} }
myOLED.setFont(SmallFont);
myOLED.clrScr();
myOLED.print("OFF", CENTER, 0);
myOLED.update();
digitalWrite(SORTIE_ALIM, LOW); digitalWrite(SORTIE_ALIM, LOW);
delay(1000); delay(1000);
} }