Advertisement
Alexcnc

Czas dzialania w minutach

Mar 16th, 2020
101
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <TM74HC595Display.h>
  2.  
  3. int SCLK = 7;
  4. int RCLK = 6;
  5. int DIO = 5;
  6. unsigned int czas;
  7. unsigned char LED_0F[29];
  8.  
  9. TM74HC595Display disp(SCLK, RCLK, DIO);
  10.  
  11. void setup()
  12. {
  13.   //Serial.begin (9600);
  14.   LED_0F[0] = 0xC0; //0
  15.   LED_0F[1] = 0xF9; //1
  16.   LED_0F[2] = 0xA4; //2
  17.   LED_0F[3] = 0xB0; //3
  18.   LED_0F[4] = 0x99; //4
  19.   LED_0F[5] = 0x92; //5
  20.   LED_0F[6] = 0x82; //6
  21.   LED_0F[7] = 0xF8; //7
  22.   LED_0F[8] = 0x80; //8
  23.   LED_0F[9] = 0x90; //9
  24.   LED_0F[10] = 0x88; //A
  25.   LED_0F[11] = 0x83; //b
  26.   LED_0F[12] = 0xC6; //C
  27.   LED_0F[13] = 0xA1; //d
  28.   LED_0F[14] = 0x86; //E
  29.   LED_0F[15] = 0x8E; //F
  30.   LED_0F[16] = 0xC2; //G
  31.   LED_0F[17] = 0x89; //H
  32.   LED_0F[18] = 0xF9; //I
  33.   LED_0F[19] = 0xF1; //J
  34.   LED_0F[20] = 0xC3; //L
  35.   LED_0F[21] = 0xA9; //n
  36.   LED_0F[22] = 0xC0; //O
  37.   LED_0F[23] = 0x8C; //P
  38.   LED_0F[24] = 0x98; //q
  39.   LED_0F[25] = 0x92; //S
  40.   LED_0F[26] = 0xC1; //U
  41.   LED_0F[27] = 0x91; //Y
  42.   LED_0F[28] = 0xFE; //hight -
  43. }
  44.  
  45. void loop()
  46.  
  47. {
  48.   czas = millis() / 1000/60  ;
  49.   disp.digit4(czas);
  50. }
Advertisement
RAW Paste Data Copied
Advertisement