I've had some issues with my IoT printer jamming as well. What i found was if i comment out the inverse AND underline code, the printer tweets just fine. But, if either is still enabled it'll print out a line of inverse/underline and get "stuck".
This appears to be a mechanical issue -- if i try to print out a line of inverse/underline text, then re-upload the program to the Arduino with the underline/inverse commented out, it *still* won't print until the paper is pulled up a bit (and there's a slight feel of something becoming unstuck when doing that). After that, it prints just fine.
The change:
- Code: Select all
// Output to printer
printer.wake();
//printer.inverseOn();
printer.write(' ');
printer.print(fromUser);
for(i=strlen(fromUser); i<31; i++) printer.write(' ');
//printer.inverseOff();
//printer.underlineOn();
printer.print(timeStamp);
for(i=strlen(timeStamp); i<32; i++) printer.write(' ');
//printer.underlineOff();
printer.println(msgText);
printer.feed(3);
printer.sleep();
It's kind of a bummer, since the inverse & underlining definately make things look much better, but it's better than not working at all

So if you're having issues with printing, give this a try to see if it alleviates the issue.
On a side note, which may or may not be related, the small button on the thermal printer itself doesn't appear to fully work on my unit. If i hold it down when powering up the unit, it prints out the test page fine. However, once the unit is on, pressing the button doesn't do anything -- and AFAIK it's supposed to feed the paper.