Simplest of programs to print a number to the dispBoB
Dependencies: dispBoB mbed PCA9635
Diff: printNumber.cpp
- Revision:
- 2:2cd54fb949d9
- Parent:
- 1:6af9f50cb98f
diff -r 6af9f50cb98f -r 2cd54fb949d9 printNumber.cpp --- a/printNumber.cpp Mon Jul 11 14:09:06 2011 +0000 +++ b/printNumber.cpp Mon Jul 11 14:14:47 2011 +0000 @@ -1,10 +1,11 @@ -#include "mbed.h" -#include "dispBoB.h" - -dispBoB db(p28, p27, p26); - -int main() { - db.init(); //ALWAYS initialise screen - db.cls(); //clear screen - db.printf("%d%", 123456); -} +#include "mbed.h" +#include "dispBoB.h" + +dispBoB db(p28, p27, p26); + +int main() { + db.init(); //ALWAYS initialise screen + db.cls(); //clear screen + db.printf("%d%", 123456); //print to the dispBoB as you would + //using the standard stdio.h printf() function +}