Sample for thermal printer using Thermal library.

Dependencies:   mbed Thermal

main.cpp

Committer:
mimil
Date:
2012-07-18
Revision:
0:025db6fb90df

File content as of revision 0:025db6fb90df:

#include "mbed.h"
#include "Thermal.h"
#include "gingerbread.cpp"

// p28 (identified as tx on mbed serial) is connected to yellow cable (identified as rx on the priter)
// p27 (identified as rx on mbed serial) is not needed
// speed is set to 19200
Thermal printer(p28, p27, 19200);

int main() {
  printf("Starting\r\n");
  printer.printf("hello");
  printer.inverseOn();
  printer.printf("world");
  printer.printBitmap(80, 95, gingerbread); 
  printf("Ending\r\n");
}