Размер видео: 1280 X 720853 X 480640 X 360
Показать панель управления
Автовоспроизведение
Автоповтор
Display anode or kathode?
For basketball 24 seconds shut clock, how to modify the code?
pano nmn sir kung single digit lng yun increment?
Text?
wala po bang code?
Sir kindly please give me the code for the 2 digit 7 segment up down Counter using Arduino code please .
//ID Numberint cntUp = 23; //Stops counting up when it reaches this valueint cntDown = 64; //Stops counting down when it reaches this value//pin state of the LEDs in the 7 segment display from digits 0-9int digit[10] ={0b1000000, 0b1111001, 0b0100100, 0b0110000, 0b0011001, 0b0010010, 0b0000010, 0b1111000, 0b0000000, 0b0010000};//button controlsint b1state0 = 1;int b2state0 = 1;int b1state1, b2state1;int b1 = 12;//count down buttonint b2 = 11;//count up button//counter controlsint countstate = cntDown - 1;//initial valueint ones, tens;int spd = 25;//about 0.5 seconds per countint rep = spd;void setup(){ for (int i = 2; i < 11; i++) { pinMode(i, OUTPUT); } pinMode(11, INPUT_PULLUP); pinMode(12, INPUT_PULLUP);}void count(int num){ for (int i = 2; i 0) { digitalWrite(9, 0); digitalWrite(10, 1); count(ones); delay(10); digitalWrite(9, 1); digitalWrite(10, 0); count(tens); delay(10); b1state1 = digitalRead(b1); if(b1state1 == 1 && b1state0 == 0) { b1state0 = b1state1; goto countdown; } b1state0 = b1state1; rep = rep - 1; } rep = spd; if(countstate != cntUp) { countstate = countstate + 1; } if(countstate > 99) { countstate = 0; } } countdown: while (1 == 1) { tens = countstate / 10; ones = countstate % 10; while (rep > 0) { digitalWrite(9, 0); digitalWrite(10, 1); count(ones); delay(10); digitalWrite(9, 1); digitalWrite(10, 0); count(tens); delay(10); b2state1 = digitalRead(b2); if(b2state1 == 1 && b2state0 == 0) { b2state0 = b2state1; goto countup; } b2state0 = b2state1; rep = rep - 1; } rep = spd; if(countstate != cntDown) { countstate = countstate - 1; } if(countstate < 0) { countstate = 99; } }}
no code 😉
Display anode or kathode?
For basketball 24 seconds shut clock, how to modify the code?
pano nmn sir kung single digit lng yun increment?
Text?
wala po bang code?
Sir kindly please give me the code for the 2 digit 7 segment up down Counter using Arduino code please .
//ID Number
int cntUp = 23; //Stops counting up when it reaches this value
int cntDown = 64; //Stops counting down when it reaches this value
//pin state of the LEDs in the 7 segment display from digits 0-9
int digit[10] =
{0b1000000,
0b1111001,
0b0100100,
0b0110000,
0b0011001,
0b0010010,
0b0000010,
0b1111000,
0b0000000,
0b0010000};
//button controls
int b1state0 = 1;
int b2state0 = 1;
int b1state1, b2state1;
int b1 = 12;//count down button
int b2 = 11;//count up button
//counter controls
int countstate = cntDown - 1;//initial value
int ones, tens;
int spd = 25;//about 0.5 seconds per count
int rep = spd;
void setup()
{
for (int i = 2; i < 11; i++)
{
pinMode(i, OUTPUT);
}
pinMode(11, INPUT_PULLUP);
pinMode(12, INPUT_PULLUP);
}
void count(int num)
{
for (int i = 2; i 0)
{
digitalWrite(9, 0);
digitalWrite(10, 1);
count(ones);
delay(10);
digitalWrite(9, 1);
digitalWrite(10, 0);
count(tens);
delay(10);
b1state1 = digitalRead(b1);
if(b1state1 == 1 && b1state0 == 0)
{
b1state0 = b1state1;
goto countdown;
}
b1state0 = b1state1;
rep = rep - 1;
}
rep = spd;
if(countstate != cntUp)
{
countstate = countstate + 1;
}
if(countstate > 99)
{
countstate = 0;
}
}
countdown:
while (1 == 1)
{
tens = countstate / 10;
ones = countstate % 10;
while (rep > 0)
{
digitalWrite(9, 0);
digitalWrite(10, 1);
count(ones);
delay(10);
digitalWrite(9, 1);
digitalWrite(10, 0);
count(tens);
delay(10);
b2state1 = digitalRead(b2);
if(b2state1 == 1 && b2state0 == 0)
{
b2state0 = b2state1;
goto countup;
}
b2state0 = b2state1;
rep = rep - 1;
}
rep = spd;
if(countstate != cntDown)
{
countstate = countstate - 1;
}
if(countstate < 0)
{
countstate = 99;
}
}
}
no code 😉