Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 0:4fda2fda81e3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Jul 09 08:08:52 2018 +0000
@@ -0,0 +1,37 @@
+#include "mbed.h"
+
+ #include "EPSON.h"
+
+ Serial pc(USBTX, USBRX);
+ EPSON tp(D1,D0); // tx, 9600bps
+
+ int main()
+ {
+ tp.initialize();
+ tp.putLineFeed(2);
+
+ tp.printf("**EPSON Thermal Printer **\r\r");
+
+
+
+ tp.setDoubleSizeWidth();
+ tp.printf("ABCDEFG 0123456789\r");
+ tp.clearDoubleSizeWidth();
+
+ tp.setDoubleSizeHeight();
+ tp.printf("ABCDEFG 0123456789\r");
+ tp.clearDoubleSizeHeight();
+
+ tp.PrintBarCode("1234567890123456",16);
+
+ pc.printf("EPSON Thermal Printer\n\n");
+
+
+ while(1) {
+ if (pc.readable()) {
+ int c = pc.getc();
+ pc.putc(c);
+ tp.putc(c);
+ }
+ }
+ }
\ No newline at end of file