Go Down

Topic: Working with font larger than 8x8 (Read 324 times) previous topic - next topic

bratan

Storing 8x8 font is relatively simple in array of bytes. 1 represents on, 0 off.
Code: [Select]
byte w[8]={B00000000,B10010010,B10101010,B10101010,B10101010,B10101010,B10101010,B01000100};
But how would I go about working with 16x16 font?  Integer is 2 bytes, but I have no idea how would I store something like B1000000100000010?  Any clues? :)
Xronos Clock - A talking arduino based alarm clock is now available. Check out xronosclock.com for pictures, source code, schematics, and purchasing info :)

PaulS

Quote
Any clues?

Use hex notation, instead.

Nick Gammon

Or  use the 0bxxx notation, eg.

Code: [Select]

void setup ()
  {
  int foo = 0b1000000100000010; 
  }  // end of setup
 
void loop () { }
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

bratan

Xronos Clock - A talking arduino based alarm clock is now available. Check out xronosclock.com for pictures, source code, schematics, and purchasing info :)

Go Up