Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 3 months ago.
miniFont example won't compile.
Hi,
The example
@code
- include "miniFont.h" miniFont myFont;
int main() {
char characterData[5];
char letter = 'x';
if (myFont.getChar(letter,&characterData)) {
for (int row = 0; row < myFont.getPixHeight(letter); row++) {
for (int col = myFont.getPixWidth(letter) - 1; col >= 0; col) { start at the left no the right
if (characterData[row] & (0x01<<col))
printf("1");
else
printf("0");
}
printf("\n");
}
}
}
@endcode
Has a compile error :
Error: Argument of type "char (*)[5]" is incompatible with parameter of type "const char " in "main.cpp", Line: 9, Col: 31
Question relating to:
1 Answer
9 years, 3 months ago.
Sorry, I forgot the change the example when I made a change to how the library worked. It's now correct.
Also see WS2812Text https://developer.mbed.org/users/AndyA/code/WS2812Text/ for a more complex example that uses the library to display text on an LED grid.