Facebook
From Mateusz WiliƄski, 4 Years ago, written in C.
Embed
Download Paste or View Raw
Hits: 209
  1. #include <Arduino.h>
  2. #include <TM1637Display.h>
  3.  
  4. #define CLK 2
  5. #define DIO 3
  6. int pot = A2;
  7. TM1637Display display(CLK, DIO);
  8.  
  9. void setup(){
  10.  
  11. }
  12. void loop(){{
  13.   display.setBrightness(7,true);
  14.   uint8_t data[] = {0x0, 0x0, 0x0, 0x0};
  15.   display.setSegments(data);
  16.   int potValue = analogRead(pot);
  17.   display.showNumberDec(potValue);
  18. }