A8, A9 not in scope; general cleanup

Getting the A8 A9 are not in scope error. Also looking if there's some cleanup available?

I still have to add code to control this -> http://www.sparkfun.com/products/9766 but I wanted to get an idea of where I'm at first.

This is on a mega 2560.

Thanks

dial_board.pde (19.7 KB)

I don't see any need for analog pins there - why not just use their digital equivalent names?

I pasted your code into the IDE (0022), selected the Mega 2560 board, and got this "error":

Binary sketch size: 6476 bytes (of a 258048 byte maximum)

PaulS:
I pasted your code into the IDE (0022), selected the Mega 2560 board, and got this "error":

Binary sketch size: 6476 bytes (of a 258048 byte maximum)

That's what I forgot. Was still set to the Mini 328 :blush:

CR, what are the analog-digital equivalents?

I've not alot of experience in arrays, did I do the convention correctly for the digit calling within the switch and character functions?

Thanks

I'm guessing 54-69, haven't used one myself yet.

These sections
// 1000 my additiion, looking to see if all uniqe
if ((dig1_1 == HIGH) && (dig1_2 == LOW) && (dig1_4 == LOW) && (dig1_8 == LOW)){
digit1 = 1;
}
coud also be done as swith:case
Where dig1_1, 2,4,8 and dig2_1,2,4,8 etc given hi/lo values?

CrossRoads:
I'm guessing 54-69, haven't used one myself yet.

These sections
// 1000 my additiion, looking to see if all uniqe
if ((dig1_1 == HIGH) && (dig1_2 == LOW) && (dig1_4 == LOW) && (dig1_8 == LOW)){
digit1 = 1;
}
coud also be done as swith:case
Where dig1_1, 2,4,8 and dig2_1,2,4,8 etc given hi/lo values?

Sorry, I'm not quite sure I understand?

I thought about making them an array, but then i figured that would make thing more complicated- converting binary 1-2-4-8 to 0-1-2-3 isn't the most intuitive thing...IMO.

I'm personally a KISS follower. Keeping it simple when I can.

When I'm doing the assignments for what each digit is, do I need the numbers in apostrophe's as well, like the letters? Or does it not matter as long as the assignments and the switch cases agree?

Made a couple revisions:

Made input pins default high
Made output pins default low

added character and brightness control for the serial indicator panel

dial_board.pde (23.1 KB)

another revision. Fixed the indices calling the characters. I had 1, 2, 3, 4 instead of 0, 1, 2, 3.

dial_board.pde (23.1 KB)

Does anymore cleanup need to be performed on that last upload revision?