Sample for thermal printer using Thermal library.

Dependencies:   mbed Thermal

Committer:
mimil
Date:
Wed Jul 18 13:06:38 2012 +0000
Revision:
0:025db6fb90df
comments of thermal sample

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mimil 0:025db6fb90df 1 #include "mbed.h"
mimil 0:025db6fb90df 2 #include "Thermal.h"
mimil 0:025db6fb90df 3 #include "gingerbread.cpp"
mimil 0:025db6fb90df 4
mimil 0:025db6fb90df 5 // p28 (identified as tx on mbed serial) is connected to yellow cable (identified as rx on the priter)
mimil 0:025db6fb90df 6 // p27 (identified as rx on mbed serial) is not needed
mimil 0:025db6fb90df 7 // speed is set to 19200
mimil 0:025db6fb90df 8 Thermal printer(p28, p27, 19200);
mimil 0:025db6fb90df 9
mimil 0:025db6fb90df 10 int main() {
mimil 0:025db6fb90df 11 printf("Starting\r\n");
mimil 0:025db6fb90df 12 printer.printf("hello");
mimil 0:025db6fb90df 13 printer.inverseOn();
mimil 0:025db6fb90df 14 printer.printf("world");
mimil 0:025db6fb90df 15 printer.printBitmap(80, 95, gingerbread);
mimil 0:025db6fb90df 16 printf("Ending\r\n");
mimil 0:025db6fb90df 17 }