Pyserial question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kelia Nichols

    Pyserial question

    Hello,

    I am using Pyserial to work with a RS232 device. My question is, how do I
    write hex to the device or cannot write hex to it pyserial?

    Kelia Nichols
    _______________ _______________ ________
    No trees were killed in the sending of this message. However a large number
    of electrons were terribly inconvenienced.




  • Diez B. Roggisch

    #2
    Re: Pyserial question

    Hi,
    [color=blue]
    > I am using Pyserial to work with a RS232 device. My question is, how do I
    > write hex to the device or cannot write hex to it pyserial?[/color]

    Look into the module struct - it will allow you to convert arbitrary data to
    strings representing this data as binary string. Then you simply write that
    to the serial connection. Reading is the same. I used that sucessfully for
    a Vernier LabPro.

    Regards,

    Diez

    Comment

    Working...