Author Topic: Connect Thermal Print from SPARKFUN to Wiring  (Read 5934 times)

0 Members and 1 Guest are viewing this topic.


Connect Thermal Print from SPARKFUN to Wiring
« on: November 07, 2016, 05:13:03 PM »
In advance, thank you very much for your help,
I write because I have a doubt with a wiring code, i want to know if you can helpme to solve it. I'm trying to connect the thermal printer from Sparkfun to wiring and then, use it with Wiring S.The code have this error:

error: 0:
/Applications/ error: conflicting return type specified for 'virtual void SoftwareSerial::write(uint8_t)'
In file included from /Applications/,
prueba1:-1: error: /Applications/ error:   overriding 'virtual size_t Print::write(uint8_t)'

Here is the code ..

#include <SoftwareSerial.h>
SoftwareSerial Thermal(2, 3);
int heatTime = 80;
int heatInterval = 255;
char printDensity = 15;
char printBreakTime = 15;
void setup()
 Serial.begin(57600); // for debug info to serial monitor
 Thermal.begin(19200); // to write to our new printer
void initPrinter()
 //Modify the print speed and heat
 Thermal.write(7); //Default 64 dots = 8*('7'+1)
 Thermal.write(heatTime); //Default 80 or 800us
 Thermal.write(heatInterval); //Default 2 or 20us
 //Modify the print density and timeout
 int printSetting = (printDensity<<4) | printBreakTime;
 Thermal.write(printSetting); //Combination of printDensity and printBreakTime
 Serial.println("Printer ready");
void loop()
 Thermal.println(" Visit ");
 Thermal.write(10); //Sends the LF to the printer, advances the paper
 Thermal.print(" Millis = ");
 do { } while (1>0);