doc : ajout schéma
This commit is contained in:
14
src/main.cpp
14
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);
|
||||
}
|
Reference in New Issue
Block a user