Kevin’s latest creation:
interesting , i plan to do something like this only with an lcd to save on paper
Very very nice, it’s something I was planning to do in the coming months but it looks like you beat me to it :). Great work!
Razvan
Is it possible to see the code for this, I’d love to build one.
@richardhawthorn - Kevin will be glad to share code once he’s prettied it up…in the next week or so.
Great, thanks!
Love it. Now I need to get my Happiness Machine wired up to the Electric Imp!
i can’t help but wounder if anyone saw that video on YouTube then spammed your printer XD
Any more details about the building the printer?
It’s pretty much just a plain hookup of the TXD pin on the imp (eg pin 8) to the printer, then connecting 5v to both the printer and the April board… but I agree it’d be nice to have Kevin post the code and picture of the wiring
I created a GitHub repo of the code (since I expect I’ll be improving it later on). You can find it here: https://github.com/kfury/imp-tiny-printer
BTW, the RX pin doesn’t actually do anything yet.
Also, the other wires off the printer board go to a green LED and a button on the printer’s bezel, showing printer status (ready/out of paper) and allowing for paper feeding. Those cold easily be rerouted to the imp for more interactivity (say, a ‘message waiting’ light and a ‘print queued messages’ button).
@Kevin - thanks for sharing this project! Its really great. Just got myself the same printer so going to have a play. Was wondering if you were doing the instructables you had on your github “to do” list?
Thanks to Kevin’s code got some lovely printer magic happening. I was just wondering about other commands - large text, justify text etc.
I’ve managed to get large text working but I think the way I’m doing it is wrong. For instance I can set the text to large using:
serial.write(29); serial.write(33); serial.write(25); serial.write(10);
and it works great but I’m thinking you should be able to do something like
serial.write(29,33,25,10);
If I try that though I get compile errors. I looked at blobs but that didn’t seem to help though pretty sure I’m not doing it correctly.
Any help much appreciated.
Bren.
You want to write this as a string; you can put arbitrary byte values (including NULLs) in squirrel strings. Try this:
serial.write("\\x1d\\x21\\x19\\x0a");
Worked perfectly, thanks Hugo.
These are so fun I had to chip in - I’ve built one of my own and implemented some of the extra features (underline, inverse, upside-down, l/r/c alignment, etc) - you can grab the code here: https://github.com/tombrew/ei-fw-tom/tree/master/examples/agent-examples/thermalPrinter.
I’ve got a demo page up to print to it as well, though it (the printer) is currently offline: http://demo2.electricimp.com/printer/
Can someone build one for us? Will to buy it over. We have an electric imp already and can send it over.
Hmm, last I checked there was agent code in github, but now that my printer has arrived I don’t see any.
@tbuttner @Kevin Could you please share your agent code?
Is this what you are looking for?