Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: how to convert data from a serial port read...

by dws (Chancellor)
on Dec 03, 2002 at 03:24 UTC ( #217114=note: print w/replies, xml ) Need Help??


in reply to how to convert data from a serial port read...

If you have a string of bits, and want an ASCII representation of them, there are a couple of ways to go, but the easiest is to avail yourself of unpack().     $hex = unpack("H*", $bits); will give you data in hex. If instead you want numbers, unpack() will do that, too.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://217114]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2022-09-30 13:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (126 votes). Check out past polls.

    Notices?