The letter 'A' is this:
{ 0x7C, 0x7E, 0x13, 0x13, 0x7E, 0x7C, 0x00, 0x00 }, // 'A'
Thus
cp437_font[65][0] returns 0x7C, which is 124 in decimal.
I was testing, by doing this:
Serial.println(cp437_font['A'][0]);
Yet, when I do this:
int message[] = {
'A' };
for (int i = 0; i < message_length; i++) {
int character = message*;*
Serial.println(character);*
Serial.println(cp437_font[character][0]);*
Serial.println(cp437_font['A'][0]);*
}* I get this: 65 76 124 ------ Well, last night I was getting this: 65 0 124 ------ Am I doing something wrong indexing the array? I expect the 124, not the zero.
Then, don't do that. First, http://snippets-r-us.com is the place to go for help with snippets. Second, code MUST be posted in code tags (read the sticky that you didn't bother reading) so that the forum software doesn't interpret it. I'm sure your snippet doesn't look like that.
Third, there are functions for accessing data in PROGMEM. The Serial.print() overload knows about how to access the data. Your snippet does not.
Apparently, my problem has to do with the PROGMEM thing, as if I remove that, my code works as I would expect. I've been reading up on this PROGMEM thing, but I still don't understand what I am seeing.