I have a string of binary numbers coming into my Arduino. I need to convert them into an array. The data represents the columns of light in an LED display. In my program I already have a working function that takes an array and uses the data to display words to the screen. The data needs to be formatted like shown below:
My char string could look a few different ways. Here are the examples:
char CurrentWord = "11111110001000000100011111110000000B00000001000001111111110000010000000";
Or
char CurrentWord = "1111111 0001000 0001000 1111111 0000000 B0000000 1000001 1111111 1000001 0000000";
Or even:
char CurrentWord = "B1111111 B0001000 B0001000 B1111111 B0000000 B0000000 B1000001 B1111111 B1000001 B0000000";
The above examples would produce the word "Hi" on the screen. In order for the diplay to work however the data must be converted into an array. so it must look like this:
int CurrentWordInt[] = {B1111111, B0001000, B0001000, B1111111, B0000000, B0000000, B1000001, B1111111, B1000001, B0000000};
How can I do this?