Discuss Anyone got any Raspberry Pi experience? in the Computer and Networking Forum area at ElectriciansForums.net

Welcome to ElectriciansForums.net - The American Electrical Advice Forum
Head straight to the main forums to chat by click here:   American Electrical Advice Forum

Moley

-
Esteemed
Arms
Supporter
Reaction score
2,221
I've got a device with a RS-232 output that I want to connect to a USB label printer. I know you can buy ready made units to do this but the units I've looked at cost £80+ and they seem to need to use a USB printer that does it's own emulation such as postcript or PCL. I want to just plug in a basic, cheap USB printer. Going the other way (USB > RS-232) is really cheap, 99p on ebay. Having looked at the price I thought this may be an ideal Raspberry Pi project. Receive from RS-232, translate to the correct format for the printer and then output it. I just wondered if anyone on here has any experience of doing anything similar and could suggest how I go about starting such a project considering I'm a Pi virgin!
 
If it is just passing bytes through it ought to be easy enough, if you are looking at printer format conversion I foresee a whole world of pain and wasted paper opening in front of you...
 
I use a r-pi to control my 3d printer using octopi/octoprint.

It's fairly easy stuff actually, just looks hard to get into.

If you look on the raspberrypi.org forums there is usually someone who has already developed the code.

Or just join and ask the question, someone will point you in the right direction.

It's well worth playing with a r-pi as a learning experience - easy entry stuff.
 
It didn't take long for that to go off topic ?

From what I can see it will have to do the translation too. As far as can see Windows (spit) uses one of it's APIs to do the translation when you print to a USB printer. I would have to do this myself. As you say, a whole world of pain but I do enjoy a challenge - I've been married over 20 years ?
 
I use a r-pi to control my 3d printer using octopi/octoprint.

It's fairly easy stuff actually, just looks hard to get into.

If you look on the raspberrypi.org forums there is usually someone who has already developed the code.

Or just join and ask the question, someone will point you in the right direction.

It's well worth playing with a r-pi as a learning experience - easy entry stuff.
I'll have to head over there and join up. I suppose the fact that I've never used Python won't help. I'm great at PHP and BASIC (remember that? QB64 is an excelent modern version) so looks like I need to learn a new language too.
 
Python is not too terrible to learn/use, just watch out for the two main pain-points:
  • It uses 'spaces' for indentation, and they must be consistent and preferably 4 spaces. Some editors change to tabs, etc, but you don't see that. It simply breaks.
  • Also watch out for the version 2.7 versus 3.x changes. Mostly they are OK, but stay with 3.x style if you can as 2.7 is no longer supported (though in wide use). However, one of the mind-numbingly stupid aspects of 3.x is they changed the meaning of the '/' divide operator. In 2.7 and below it behaved like any sane programming language in that if you divide an integer by an integer you get an integer result. In 3.x they decided you really wanted a floating-point result :( So in those cases you need to use '//' to get that if it will then be an array index or similar.

But at least there are lots of examples and a few very useful libraries in python to make it less-bad than many other options.
 
I'll have to head over there and join up. I suppose the fact that I've never used Python won't help. I'm great at PHP and BASIC (remember that? QB64 is an excelent modern version) so looks like I need to learn a new language too.
It's worth learning in any case, although I am not sure it would just be a cheap alternative to a dedicated converter.

You would need the pi, plus either a rs232 shield, or a 232-usb to connect the 232 into the pi

Edit:

You don't have to use python, you can use any number of languages, provided there is a compiler around, so C, perl, basic, and so on.
 
Last edited:
It's worth learning in any case, although I am not sure it would just be a cheap alternative to a dedicated converter.

You would need the pi, plus either a rs232 shield, or a 232-usb to connect the 232 into the pi
May not be cheaper but it'll be a challenge. Plus I'll learn something new in the process.
 
Python? who said Python?

"This parrot is no more! It has ceased to be! It's expired and gone to meet its maker! This is a late parrot! It's a stiff! Bereft of life, it rests in peace! If you hadn't nailed it to the perch, it would be pushing up the daisies! It's run down the curtain and joined the choir invisible! This is an ex-parrot!
 
Python? who said Python?

"This parrot is no more! It has ceased to be! It's expired and gone to meet its maker! This is a late parrot! It's a stiff! Bereft of life, it rests in peace! If you hadn't nailed it to the perch, it would be pushing up the daisies! It's run down the curtain and joined the choir invisible! This is an ex-parrot!

Hit it in one.

Python is named after monty-python!

Raspberry pi - is part named after the pi (py) in python
 
And not forgetting, in these unprecedented days we live in.....

“I’m a lumberjack and I’m ok@


sorry. Wrong song

“Always look on the bright side of life”

Doo. Deedoo. Deedoo doodoo deedoo
 

Reply to Anyone got any Raspberry Pi experience? in the Computer and Networking Forum area at ElectriciansForums.net

OFFICIAL SPONSORS

Electrical Goods - Electrical Tools - Brand Names Electrician Courses Green Electrical Goods PCB Way Electrical Goods - Electrical Tools - Brand Names Pushfit Wire Connectors Electric Underfloor Heating Electrician Courses
These Official Forum Sponsors May Provide Discounts to Regular Forum Members - If you would like to sponsor us then CLICK HERE and post a thread with who you are, and we'll send you some stats etc
This website was designed, optimised and is hosted by Untold Media. Operating under the name Untold Media since 2001.
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock