Skip to content

Instantly share code, notes, and snippets.

@atduskgreg
Created December 14, 2011 21:44
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/1478687 to your computer and use it in GitHub Desktop.
Save atduskgreg/1478687 to your computer and use it in GitHub Desktop.
arduino sketch to use my image on the thermal printer
#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