MEMS displej LED
Zo stránky SensorWiki
Sem pride navod ako rozchodit displej
Obrazok displeja s cislom a teplotou 28St.C
Obrazok pripojenia a oznacenia vyvodov
Obrazok a postup ako nainstalovat kniznicu
Ukazkovy program
/*
Basic usage example
The circuit:
* connect TM1637 pin CLK to Arduino pin D4
* connect TM1637 pin DIO to Arduino pin D5
* connect TM1637 pin Vcc to Arduino pin 5V
* connect TM1637 pin GND to Arduino pin GND
*/
#include "SevenSegmentTM1637.h" // include the SevenSegmentTM1637 library
/* initialize global TM1637 Display object
* The constructor takes two arguments, the number of the clock pin and the digital output pin:
* SevenSegmentTM1637(byte pinCLK, byte pinDIO);
*/
const byte PIN_CLK = 4; // define CLK pin (any digital pin)
const byte PIN_DIO = 5; // define DIO pin (any digital pin)
SevenSegmentTM1637 display(PIN_CLK, PIN_DIO);
char buffer[5];
int adcVal;
// run setup code
void setup() {
Serial.begin(9600); // initializes the Serial connection @ 9600 baud
display.begin(); // initializes the display
display.setBacklight(50); // set the brightness to 100 %
display.print("INIT"); // display INIT on the display
delay(1000); // wait 1000 ms
}
void loop()
{
display.clear();
adcVal = analogRead(4);
sprintf(buffer, "%4d", adcVal);
display.print(buffer); // display loop counter
Serial.println(buffer);
delay(250); // wait 1000 ms
}