Skip to content

Instantly share code, notes, and snippets.

@atduskgreg
Created December 14, 2011 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atduskgreg/1478923 to your computer and use it in GitHub Desktop.
Save atduskgreg/1478923 to your computer and use it in GitHub Desktop.
#include "SoftwareSerial.h"
#include "Thermal.h"
#include "smalldiagram.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();
// print the 57x57 pixel logo included in adalogo.cpp
delay(1000);
printer.printBitmap(67, 100, smalldiagram);
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