Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //****************************************************************************************************************************************************************************
- // ESP32 et multiples TM1637
- // Couples CLK/DIO utilisés : [16 - 17] [5 - 18 ] [19 - 21] [22 - 23 ] [32 - 33 ]
- // https://www.youtube.com/c/ClaudeDufourmont
- //****************************************************************************************************************************************************************************
- #include <TM1637Display.h>
- #define CLK1 16
- #define CLK2 5
- #define CLK3 19
- #define CLK4 22
- #define CLK5 32
- #define DIO1 17
- #define DIO2 18
- #define DIO3 21
- #define DIO4 23
- #define DIO5 33
- int MaPression;
- int MaTemperature;
- int MaVitesseDeVent;
- int MaDirectionDeVent;
- int MonHumidite;
- TM1637Display display1(CLK1, DIO1);
- TM1637Display display2(CLK2, DIO2);
- TM1637Display display3(CLK3, DIO3);
- TM1637Display display4(CLK4, DIO4);
- TM1637Display display5(CLK5, DIO5);
- void setup()
- {
- Serial.begin(115200);
- display1.setBrightness(0x0f);
- display2.setBrightness(0x0f);
- display3.setBrightness(0x0f);
- display4.setBrightness(0x0f);
- display5.setBrightness(0x0f);
- }
- void loop()
- {
- MaPression = 1111 ;
- MaVitesseDeVent = 2222;
- MaTemperature = 3333;
- MaDirectionDeVent = 4444;
- MonHumidite = 5555;
- Serial.println( MaPression );
- delay (500);
- Serial.println( MaTemperature );
- delay (500);
- Serial.println( MaVitesseDeVent );
- delay (500);
- Serial.println (MaDirectionDeVent);
- display1.clear ();
- display2.clear ();
- display3.clear ();
- display4.clear ();
- display5.clear ();
- display1.showNumberDec(MaPression) ;
- delay(10);
- display2.showNumberDec(MaVitesseDeVent) ;
- delay(10);
- display3.showNumberDec(MaTemperature) ;
- delay(10);
- display4.showNumberDec(MaDirectionDeVent) ;
- delay(10);
- display5.showNumberDec(MonHumidite) ;
- delay(10);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement