Hello everyone,
I'm having a problem with my code where i try to do something like this:
switch (numh)
{
case 0:
//set shift register to 01010101
break;
case 1:
//set shift register to 10101010
break;
case 2:
//set shift register to 11001100
break;
}
//Something completely different
void DisplaySetHour(int numh, int i, int p)//time display function
{
if (p == 2) //exit to main menu
{
menu = 0;
menu2 == 0;
}
DateTime now = RTC.now(); //GETTING THE CURRENT HOUR VALUE
if (i == 1)
{
if (hourupg == 23)
{
hourupg = 0;
dayupg++;
}
else
{
hourupg = hourupg + 1;
}
}
if (i == 2)
{
if (hourupg == 0)
{
hourupg = 23;
dayupg--;
}
else
{
hourupg = hourupg - 1;
}
}
Serial.print("Set Hours:");
Serial.println(hourupg, DEC);
numh = hourupg;//WRITING THE HOUR VALUE TO THE DISPLAY - DOESN'T WORK
shifter.write();//UPDATING THE DISPLAY - DOESN'T WORK
}
The problem is that i would expect the code to send the numh value to the switch function where it gets "encoded"and displayed on the display. However, when I upload the code the number doesn't get displayed.
The end goal of this is to get a live readout on a nixie display as you adjust the values.
My full code is attached if you'd want to take a look and give me some advice.
Thank you in advance.
Nixie_Clock.ino (59.3 KB)