Thermal printer hello world program.
Dependencies: Adafruit_Thermal_Printer mbed
Revision 1:9ccf98857297, committed 2016-03-16
- Comitter:
- aross34
- Date:
- Wed Mar 16 19:56:34 2016 +0000
- Parent:
- 0:6325abe92741
- Commit message:
- Trouble with inverse on even strictly following user manual
Changed in this revision
TEST_THERMAL.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 6325abe92741 -r 9ccf98857297 TEST_THERMAL.lib --- a/TEST_THERMAL.lib Wed Mar 16 01:43:45 2016 +0000 +++ b/TEST_THERMAL.lib Wed Mar 16 19:56:34 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/aross34/code/Adafruit_Thermal_Printer/#de26317d87a6 +https://developer.mbed.org/users/aross34/code/Adafruit_Thermal_Printer/#1f832bfe41d1
diff -r 6325abe92741 -r 9ccf98857297 main.cpp --- a/main.cpp Wed Mar 16 01:43:45 2016 +0000 +++ b/main.cpp Wed Mar 16 19:56:34 2016 +0000 @@ -1,16 +1,15 @@ #include "mbed.h" #include "AdafruitThermal.h" -DigitalOut myled(LED1); AdafruitThermal Printer(p9, p10); int main() { - myled = 1; Printer.begin(); + Printer.setDefault(); //Printer.test(); - // **char *OutputText = "Better Work Dammit\n"; - // **Printer.print(OutputText); - + //char *OutputText = "Better Work\n"; + //Printer.print(OutputText); + char *Testing_Foo = "Hello World!\n"; Printer.print(Testing_Foo); @@ -34,12 +33,7 @@ Printer.setSize('S'); char *Text_Out10 = "Small\n"; Printer.print(Text_Out10); - - Printer.inverseOn(); - char *Text_Out1 = "Inverse ON\n"; - Printer.print(Text_Out1); - Printer.inverseOff(); - + Printer.doubleHeightOn(); char *Text_Out2 = "Double Height ON\n"; Printer.print(Text_Out2); @@ -62,7 +56,12 @@ Printer.print(Text_Out6); Printer.boldOff(); - myled = 0; - - + /* + Used to work. Stopped working after several tests for whatever reason + + char *Text_Out1 = "Inverse ON\n"; + Printer.inverseOn(); + Printer.print(Text_Out1); + Printer.inverseOff(); + */ }