What type of code is?

I am running a led matrix board that is 32 x 8 and the following code is for the numbers and images to display.

What type of code is? 0b0100, 0b000...etc How does it work?
How can I modify it for a led matrix that is 64 x 16?

#define DIGIT_WIDTH 6
#define DIGIT_HEIGHT 8

char DIGIT_0 [] = {
  0b1110, 0b0111, 0b1111, 0b1111, 0b0001, 0b1000, 0b0001, 0b1000, 0b1111, 0b1111, 0b1110, 0b0111, 0b0000, 0b0000, 0b0000, 0b0000};

char DIGIT_1 [] = {
  0b0000, 0b0000, 0b0010, 0b0000, 0b0010, 0b0000, 0b1111, 0b1111, 0b1111, 0b1111, 0b0000, 0b0000, 0b0000, 0b0000, 0b0000, 0b0000};

char DIGIT_2 [] = {
  0b0010, 0b1100, 0b0011, 0b1110, 0b0001, 0b1011, 0b1001, 0b1001, 0b1111, 0b1000, 0b0110, 0b1000, 0b0000, 0b0000, 0b0000, 0b0000};

char DIGIT_3 [] = {
  0b0010, 0b0100, 0b0011, 0b1100, 0b1001, 0b1000, 0b1001, 0b1000, 0b1111, 0b1111, 0b0110, 0b0111, 0b0000, 0b0000, 0b0000, 0b0000};

char DIGIT_4 [] = {
  0b1000, 0b0011, 0b1100, 0b0011, 0b0010, 0b0010, 0b1111, 0b1111, 0b1111, 0b1111, 0b0000, 0b0010, 0b0000, 0b0000, 0b0000, 0b0000};

char DIGIT_5 [] = {
  0b1111, 0b0100, 0b1111, 0b1100, 0b1001, 0b1000, 0b1001, 0b1000, 0b1001, 0b1111, 0b0001, 0b0111, 0b0000, 0b0000, 0b0000, 0b0000};

char DIGIT_6 [] = {
  0b1000, 0b0111, 0b1110, 0b1111, 0b0011, 0b1001, 0b0001, 0b1001, 0b0001, 0b1111, 0b0000, 0b0110, 0b0000, 0b0000, 0b0000, 0b0000};

char DIGIT_7 [] = {
  0b0001, 0b0000, 0b0001, 0b1100, 0b0001, 0b1111, 0b1101, 0b0011, 0b1111, 0b0000, 0b0111, 0b0000, 0b0000, 0b0000, 0b0000, 0b0000};

char DIGIT_8 [] = {
  0b0110, 0b0111, 0b1111, 0b1111, 0b1001, 0b1000, 0b1001, 0b1000, 0b1111, 0b1111, 0b0110, 0b0111, 0b0000, 0b0000, 0b0000, 0b0000};

char DIGIT_9 [] = {
  0b0110, 0b0000, 0b1111, 0b1000, 0b1001, 0b1000, 0b1001, 0b1100, 0b1111, 0b0111, 0b1110, 0b0001, 0b0000, 0b0000, 0b0000, 0b0000};

#define TEXT_WIDTH 32
#define TEXT_HEIGHT 8

char TEXT_Rally []   = {
  0b1111, 0b1111, 0b1111, 0b1111, 0b0001, 0b0001, 0b0001, 0b0001, 0b0001, 0b0001, 0b1111, 0b1111, 0b1110, 0b1110, 0b0000, 0b0000, 0b0000, 0b1111, 0b1100, 0b1111, 0b1111, 0b0010, 0b1111, 0b0010, 0b1100, 0b1111, 0b0000, 0b1111, 0b0000, 0b0000, 0b1111, 0b1111, 0b1111, 0b1111, 0b0000, 0b1000, 0b0000, 0b1000, 0b0000, 0b1000, 0b0000, 0b0000, 0b1111, 0b1111, 0b1111, 0b1111, 0b0000, 0b1000, 0b0011, 0b1000, 0b0111, 0b1000, 0b1100, 0b0000, 0b1000, 0b1111, 0b1000, 0b1111, 0b1100, 0b0000, 0b0111, 0b0000, 0b0011, 0b0000};

char TEXT_L_WIN []   = {
  0b0000, 0b0000, 0b0000, 0b0000, 0b0000, 0b0000, 0b1000, 0b0001, 0b1100, 0b0011, 0b1110, 0b0111, 0b0000, 0b0000, 0b0000, 0b0000, 0b1111, 0b0001, 0b1111, 0b0111, 0b0000, 0b1110, 0b0000, 0b1110, 0b1100, 0b0111, 0b1100, 0b0111, 0b0000, 0b1110, 0b0000, 0b1110, 0b1111, 0b0111, 0b1111, 0b0001, 0b0000, 0b0000, 0b1111, 0b1111, 0b1111, 0b1111, 0b0000, 0b0000, 0b1111, 0b1111, 0b1111, 0b1111, 0b1110, 0b0001, 0b1000, 0b0011, 0b0000, 0b1111, 0b1111, 0b1111, 0b1111, 0b1111, 0b0000, 0b0000, 0b0000, 0b0000, 0b0000, 0b0000};

char TEXT_R_WIN []   = {
  0b0000, 0b0000, 0b0000, 0b0000, 0b0000, 0b0000, 0b1111, 0b0001, 0b1111, 0b0111, 0b0000, 0b1110, 0b0000, 0b1110, 0b1100, 0b0111, 0b1100, 0b0111, 0b0000, 0b1110, 0b0000, 0b1110, 0b1111, 0b0111, 0b1111, 0b0001, 0b0000, 0b0000, 0b1111, 0b1111, 0b1111, 0b1111, 0b0000, 0b0000, 0b1111, 0b1111, 0b1111, 0b1111, 0b1110, 0b0001, 0b1000, 0b0011, 0b0000, 0b1111, 0b1111, 0b1111, 0b1111, 0b1111, 0b0000, 0b0000, 0b0000, 0b0000, 0b1110, 0b0111, 0b1100, 0b0011, 0b1000, 0b0001, 0b0000, 0b0000, 0b0000, 0b0000, 0b0000, 0b0000};

http://arduino.cc/en/Reference/Byte#.Uy0CXfldW_g

It's just the standard notation for a binary representation of a number

12
0x0C
0b1100
0b00001100

are all the same value, just represented differently according to what's appropriate at the time.

In this case I assume the values are pixels in rows on the LCD so showing them as 1s and 0s makes sense. Although I would be inclined to do it like this

char DIGIT_0 [] = {
  0b00001110,
  0b00000111,
  0b00001111, ... etc

so the bit locations are more obvious, at least to start with while figuring it all out, then maybe suck them all back onto a single line once they are all correct.


Rob

Here's an example:
http://arduinoprojects101.com/arduino-liquidcrystal-character-creator/

ok..thanks

but how does each one of those values correspond to a pixel being on or off on a led matrix? Im confused how it draws out the number with the values

The exact mapping between the bits in the values and the actual pixels on the display depend entirely on the manner in which the Arduino and the display are connected. There are a 1000 ways to do it, often those values are shifted out into shift registers where a 1 turns a LED on and a 0 turns it off.

Or the bits can be used in a loop to set pins HIGH or LOW with digitalWrite().

Unless someone can find and example or a tutorial it's probably too large a topic to cover here.


Rob

Try this :
http://mikeyancey.com/hamcalc/lcd_characters.php

I understand it now...for every 2 lines of code is for 1 column that equals 8 leds high.
Now how do i adjust the code for a led matrix that is 64 x 16 height?

Does the code go from 4 digits to 8? ie 0b0001 to 0b00000001?

for every 2 lines of code is for 1 column that equals 8 leds high.

That may be but we aren't privy to the information you are.

0b0001 and 0b00000001 are exactly the same value, ie 1, leading 0s are ignored and mostly used to align values for human benefit.

I think we've gone as far as possible without seeing all the code and knowing how the hardware is connected.


Rob