Hello people!
I need to write code that shows a counter on a single seven segment display module (0-9), and I need help figuring out what the most effective way to display numbers on a seven segment display is, without using external libraries. I would also like it to be not too complex, as I am a beginner to Arduino and C in general. So far, I'm doing it manually in a function:
case 0:
digitalWrite(A, HIGH);
digitalWrite(B, HIGH);
digitalWrite(C, HIGH);
digitalWrite(D, HIGH);
digitalWrite(E, HIGH);
digitalWrite(F, HIGH);
digitalWrite(G, LOW);
break;
This adds ~100 lines of extra unnecessary messy code, and I was wondering if there was a more efficient way to do this? I've attempted messing around with arrays and whatnot, but I couldn't get it to work. Help?