Download Tokopedia App
Tentang TokopediaMulai Berjualan PromoTokopedia Care
tokopedia-logo
Kategori
Atur jumlah dan catatan

Stok Total: 40

Subtotal

Rp24.990

0.56" 2 Digit Seven 7 Segment Display Module Digital LED Tube 74HC595

Rp24.990
  • Kondisi: Baru
  • Min. Pemesanan: 1 Buah
  • Etalase: LCD | 7 SEGMENT | DOT MATRIX
A 7-segment two digit display, each digit controlled by a 74HC595 integrated. Each digit has a height of 12.7mm with bright red illumination. It can use the screen with a microcontroller, for example Arduino. The monitor connects to the microscope using only three signal cables and two power cables. The operating voltage is between 3-5VDC.

Contoh program

#include
// create shift register object (number of shift registers, data pin, clock pin, latch pin)
ShiftRegister74HC595 sr (2, 11, 12, 8);

int number=99; // <--- Change it from 0 to 99

int value,digit1,digit2,digit3,digit4;
uint8_t numberB[] = {B11000000, //0
B11111001, //1
B10100100, //2
B10110000, //3
B10011001, //4
B10010010, //5
B10000011, //6
B11111000, //7
B10000000, //8
B10011000 //9
};

void setup() {
//Count from 0 to 'number'
countUp();
//Count from 'number' to 0
//countDown(); // <--- Comment countUp and uncomment countDown
//Blink 4 times all on and all off.
blink();
}

void loop() {

}

void countUp(){
for (int i = 0; i<=number; i++){
//Split number to digits:
digit2=i % 10 ;
digit1=(i / 10) % 10 ;
//Send them to 7 segment displays
uint8_t numberToPrint[]= {numberB[digit1],numberB[digit2]};
sr.setAll(numberToPrint);
//Reset them for next time
digit1=0;
digit2=0;
delay(1000); // Repeat every 1 sec


void countDown(){
for (number; number>=0; number--){
//Split number to digits:
digit2=number % 10 ;
digit1=(number / 10) % 10 ;
//Send them to 7 segment displays
uint8_t numberToPrint[]= {numberB[digit1],numberB[digit2]};
sr.setAll(numberToPrint);
//Reset them for next time
digit1=0;
digit2=0;
delay(1000); // Repeat every 1 sec


//Blink
void blink(){
for(int i = 0; isr.setAllLow(); // set all pins Low (off)
delay(1000);
sr.setAllHigh(); // set all pins High (on)
delay(1000);

Ada masalah dengan produk ini?

ULASAN PEMBELI

5.0/ 5.0

100% pembeli merasa puas

7 rating • 2 ulasan

5(7)100%
4(0)0%
3(0)0%
2(0)0%
1(0)0%