Guest User

Untitled

a guest
Feb 13th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. #include <Arduino.h>
  2. #include <TM1637Display.h>
  3.  
  4. #define CLK 2
  5. #define DIO 3
  6.  
  7.  
  8. const uint8_t SEG_DONE[] = {
  9.   SEG_B | SEG_C | SEG_D | SEG_E | SEG_G,           // d
  10.   SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F,   // O
  11.   SEG_C | SEG_E | SEG_G,                           // n
  12.   SEG_A | SEG_D | SEG_E | SEG_F | SEG_G            // E
  13.   };
  14.  
  15.   const uint8_t SEG_ELO[] = {
  16.   SEG_F | SEG_E | SEG_A | SEG_G | SEG_D, //E
  17.   SEG_F | SEG_E | SEG_D, //L
  18.   SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F, //O
  19. };
  20. TM1637Display display(CLK, DIO);
  21.  
  22. void setup()
  23. {
  24. }
  25. void loop()
  26. {
  27.   uint8_t data[] = { 0xff, 0xff, 0xff, 0xff };
  28.   display.setBrightness(0x0f);
  29.  
  30.    display.setSegments(SEG_DONE);
  31. delay(5000);
  32.    display.setSegments(SEG_ELO);
  33. delay(5000);
  34. }
Advertisement
Add Comment
Please, Sign In to add comment