Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Arduino.h>
- #include <TM1637Display.h>
- #define CLK 2
- #define DIO 3
- const uint8_t SEG_DONE[] = {
- SEG_B | SEG_C | SEG_D | SEG_E | SEG_G, // d
- SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F, // O
- SEG_C | SEG_E | SEG_G, // n
- SEG_A | SEG_D | SEG_E | SEG_F | SEG_G // E
- };
- const uint8_t SEG_ELO[] = {
- SEG_F | SEG_E | SEG_A | SEG_G | SEG_D, //E
- SEG_F | SEG_E | SEG_D, //L
- SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F, //O
- };
- TM1637Display display(CLK, DIO);
- void setup()
- {
- }
- void loop()
- {
- uint8_t data[] = { 0xff, 0xff, 0xff, 0xff };
- display.setBrightness(0x0f);
- display.setSegments(SEG_DONE);
- delay(5000);
- display.setSegments(SEG_ELO);
- delay(5000);
- }
Advertisement
Add Comment
Please, Sign In to add comment