Created
December 14, 2011 21:44
-
-
Save atduskgreg/1478687 to your computer and use it in GitHub Desktop.
arduino sketch to use my image on the thermal printer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "SoftwareSerial.h" | |
#include "Thermal.h" | |
#include "computerdiagram.cpp" | |
int printer_RX_Pin = 2; // this is the green wire | |
int printer_TX_Pin = 3; // this is the yellow wire | |
Thermal printer(printer_RX_Pin, printer_TX_Pin); | |
void setup(){ | |
Serial.begin(9600); | |
printer.begin(); | |
delay(1000); | |
printer.printBitmap(257, 384, computerdiagram); | |
printer.print("ITP Thesis Archive!"); | |
delay(1000); | |
printer.sleep(); //Tell printer to sleep. MUST call wake before printing again, even if reset | |
printer.wake(); //Wake printer. | |
printer.setDefault(); //set printer to defaults. ****WILL FEED SEVERAL LINES WHEN CALLED*** | |
} | |
void loop(){ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment