bridystone / SevSegShift

Seven segment display controller library for Arduino
MIT License
28 stars 8 forks source link

LED just rotate and do nothing #6

Closed vohai2003 closed 3 years ago

vohai2003 commented 3 years ago

I think I made a mistake, but I don't know where. My LED segment just rotate like it's in idle mode, although I've put some numbers.

include

include

const int DHT_pin = A1; const int DHT_type = DHT22; DHT dht(DHT_pin,DHT_type); SevSeg myDisplay; int count = 0; char buff[10]; float temp; void setup() { // put your setup code here, to run once: byte displaytype = COMMON_CATHODE; byte digit1 = 8; byte digit2 = 12; //Pin 9 led 7 đoạ byte digit3 = 13; //Pin 8 led 7 đoạn byte digit4 = 2; //Pin 6 led 7 đoạ byte segA = 9; //Pin 11 led 7 đo byte segB = 11; //Pin 7 led 7 đoạ byte segC = 4; //Pin 4 led 7 đoạ byte segD = 6; //Pin 2 led 7 đoạ byte segE = 7; //Pin 1 led 7 đoạ byte segF = 10; //Pin 10 led 7 đoạ byte segG = 3; //Pin 5 led 7 đoạ byte segDP= 5; //Pin 3 led 7 đoạ byte numberOfDigits = 4; // số dấu chấ byte digitpin[] = { digit1, digit2, digit3, digit4}; byte segpin[] = {segA, segB, segC, segD, segE, segF, segG, segDP}; myDisplay.begin(displaytype, numberOfDigits, digitpin, segpin, false, false, false, false); // Bắt đầu cho phép giao tiếp Module LED 7 đoạn với Arduin myDisplay.setBrightness(30); //điều chỉnh độ sáng của Module LE

}

void loop() { // put your main code here, to run repeatedly: count ++; if (count >=100) { temp = dht.readTemperature(); count = 0; myDisplay.setNumber(temp, 2); myDisplay.blank(); myDisplay.refreshDisplay(); } delay(10); }

bridystone commented 3 years ago

Hi Vohai,

I just happen to come along here. I might have missed a mail. Is this topic still open?

Jens

bridystone commented 3 years ago

probably no issue anymore or no issue of the project code at all