Raspberry Pi

253 views
Skip to first unread message

andrewn

unread,
Jun 12, 2012, 11:18:45 AM6/12/12
to gfr-p...@googlegroups.com
Hi,

I've been playing around with replacing the Arduino with a Raspberry Pi. You can find some instructions to what I've done, and a bit of python code that polls the print server and sends to the printer.

At the moment, the software won't create a new printer ID for you so you have to use an existing printer id. I'm hoping to add this functionality soon though. It also doesn't support any sort of LEDs or press-to-print button, anything received gets printed out straight away.

It's all a bit rough and ready but I'd love some feedback.

Thanks,
Andrew

James Adam

unread,
Jun 12, 2012, 6:55:51 PM6/12/12
to gfr-p...@googlegroups.com
Hey Andrew!

That's really great - thanks for posting about it. Keep us informed about your progess too.

I think creating a new printer ID should be quite straightforward - it's just a random string (as I'm sure you know), so I'd guess all you would need to do would be to check for the presence of the ID file, and create it if it's missing. Let me know if you have any problems with that.

Also, have you considered powering the printer directly from the Raspberry Pi board? I believe that the 5V pin on the GPIO headers will pass through any remaining current that the board hasn't used, so with a suitable power supply I think you might be able to do so. I'm not an electronics expert though :)

I have just got my own Raspberry Pi recently, so I'll follow your instructions and let you know how I go.

- James

Chris Lowis

unread,
Jun 13, 2012, 8:19:58 AM6/13/12
to gfr-p...@googlegroups.com
I'm going to work with Andrew to try and package this up as a debian package for the Rasberry Pi "squeeze" distribution, which will hopefully help people to get going quickly too. 

Cheers, 

Chris 

Andrew Nicolaou

unread,
Jun 13, 2012, 8:34:42 AM6/13/12
to gfr-p...@googlegroups.com
Hi James,

I've just added printer id generation. The algorithm will generate the same sort of unique id as the arduino sketch i.e. 16 chars composed of a-z0-9.

I've noticed that the Arduino code sends an "X-Printer-Version" header. I should probably send something similar too, but how do we avoid things getting confused?

Cheers,
Andrew

--
You received this message because you are subscribed to the Google Groups "Printer" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/gfr-printer/-/0OjCm9Zt2e0J.
To post to this group, send an email to gfr-p...@googlegroups.com.
To unsubscribe from this group, send email to gfr-printer...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gfr-printer?hl=en-GB.

James Adam

unread,
Jun 21, 2012, 12:19:26 PM6/21/12
to gfr-p...@googlegroups.com
My intention for the version header was simply so that I could prompt people to upgrade to newer versions in the future, but I haven't really done much with it yet.

Strictly speaking you don't need to include that header, and if you do, at present you can set it to be whatever you please.

- James

Andreas W

unread,
Nov 3, 2012, 6:27:14 AM11/3/12
to gfr-p...@googlegroups.com
Hey,

as i got some trouble with the arduino and wifi it will try to solve this with using an raspberry pi.
Thanks for the first development on this! As soon as i will receive my raspberrys i will give it a try!

For button and leds this will be a good point to start - i think:
GPIO Raspberry Python

As long as i have no raspberry i have to wait to test it but maybe someone else with an rapsberry will give it a try?!

best regards

Andreas W

unread,
Dec 22, 2012, 11:05:40 AM12/22/12
to gfr-p...@googlegroups.com
Hey,

i finally got an brand new raspberrypi :)

Fired up the python script and it works great - but i think there is some issue with paper feed, sometimes the paper stucks
as there is no feed - pulling the paper a little bit the print goes on.
How to tune the paperfeed a little bit? Is there any way to do this? The test print (power on and hold button) is really fast and without any problems,
i guess there is way to improve the output a little bit.

Best regards!!

James Adam

unread,
Jan 8, 2013, 2:47:00 PM1/8/13
to gfr-p...@googlegroups.com
Sticking paper is normally a symptom of either the darkness being too high, or the paper quality not being quite high enough. I've had some papers that have always stuck, regardless of how faint I tried to set the printer :-/

- James

--
You received this message because you are subscribed to the Google Groups "Printer" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/gfr-printer/-/6zylSHsBPioJ.

blogmywiki

unread,
Apr 23, 2013, 2:56:23 PM4/23/13
to gfr-p...@googlegroups.com
I've had no problems with till roll from Rymans - sometimes slightly faint, but, like Uncle Ben's Rice... it never sticks!

blogmywiki

unread,
Apr 23, 2013, 2:59:09 PM4/23/13
to gfr-p...@googlegroups.com
Thank you so much for this work, Andrew - here's what I got up to with your code so far: http://www.suppertime.co.uk/blogmywiki/2013/04/making-a-gofreerange-printer-with-a-raspberry-pi/

blogmywiki

unread,
Apr 24, 2013, 8:21:27 AM4/24/13
to gfr-p...@googlegroups.com
Hi Andrew - I've now followed your instructions on how to get the printer.py script running at boot, but it doesn't seem to be starting up. I think I might have missed a step somewhere or maybe something is different with the version of Raspbian I am using?


On Tuesday, June 12, 2012 4:18:45 PM UTC+1, andrewn wrote:

andrewn

unread,
May 6, 2013, 3:08:59 PM5/6/13
to gfr-p...@googlegroups.com
I'm so glad you found it helpful and got everything running!

Since I published the python code, I've re-written it in javascript using nodejs, since that's what I'm more familiar with. 

This version of the code supports:
 - flashing LEDs and playing an MP3 when a messages arrive;
 - waiting for a button push before printing messages.

The code's in the 'js' branch on github:

I haven't updated the instructions so it might be a bit confusing. Let me know if you want some instructions on getting it running. 

Here's a video of it all working, the owl sound is played when the message arrives:

Andrew

andrewn

unread,
May 7, 2013, 5:24:24 AM5/7/13
to gfr-p...@googlegroups.com
Hi,

I had trouble getting the script to start correctly as a service too and unfortunately I can't remember what I did to get it working. I followed these instructions:

I see from your blog post that you got around it by referencing the script in rc.local which does the same job!

Andrew
Reply all
Reply to author
Forward
0 new messages