Skip to main content
Improved code formatting
Source Link
Peter Bloomfield
  • 11k
  • 9
  • 48
  • 87

I have programmed an IR remote control along with an LED and an 8bit 7segment on an Arduino Uno. the segment displays the number I press via the remote, and the LED turns on and off here's my code: case 16738455: Serial.println(0); if (oldvalue == results.value){ on(num0); delay(1000); on(num00); delay(1000); oldvalue = results.value; } oldvalue

case 16738455:
  Serial.println(0);
  if (oldvalue == results.value){
    on(num0);
    delay(1000);
    on(num00);
    delay(1000);
    oldvalue = results.value;
  }

oldvalue stores the last value pressed, which is the DEC value of the buttons, num0 displays the number zero, and num00 turns all the segments off. I want the 7segment to blink again when I press the same button again. Can anyone help me with this? Thanks

I have programmed an IR remote control along with an LED and an 8bit 7segment on an Arduino Uno. the segment displays the number I press via the remote, and the LED turns on and off here's my code: case 16738455: Serial.println(0); if (oldvalue == results.value){ on(num0); delay(1000); on(num00); delay(1000); oldvalue = results.value; } oldvalue stores the last value pressed, which is the DEC value of the buttons, num0 displays the number zero, and num00 turns all the segments off. I want the 7segment to blink again when I press the same button again. Can anyone help me with this? Thanks

I have programmed an IR remote control along with an LED and an 8bit 7segment on an Arduino Uno. the segment displays the number I press via the remote, and the LED turns on and off here's my code:

case 16738455:
  Serial.println(0);
  if (oldvalue == results.value){
    on(num0);
    delay(1000);
    on(num00);
    delay(1000);
    oldvalue = results.value;
  }

oldvalue stores the last value pressed, which is the DEC value of the buttons, num0 displays the number zero, and num00 turns all the segments off. I want the 7segment to blink again when I press the same button again. Can anyone help me with this? Thanks

Source Link

7segment blink when the button is pressed

I have programmed an IR remote control along with an LED and an 8bit 7segment on an Arduino Uno. the segment displays the number I press via the remote, and the LED turns on and off here's my code: case 16738455: Serial.println(0); if (oldvalue == results.value){ on(num0); delay(1000); on(num00); delay(1000); oldvalue = results.value; } oldvalue stores the last value pressed, which is the DEC value of the buttons, num0 displays the number zero, and num00 turns all the segments off. I want the 7segment to blink again when I press the same button again. Can anyone help me with this? Thanks