Pyserial question

Discussion in 'Python' started by Diez B. Roggisch, Jan 5, 2004.

  1. Hi,

    > 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?


    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
     
    Diez B. Roggisch, Jan 5, 2004
    #1
    1. Advertisements

  2. 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.
     
    Kelia Nichols, Jan 5, 2004
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jorjun
    Replies:
    1
    Views:
    795
    John P. Speno
    Jan 8, 2004
  2. Grant Edwards
    Replies:
    6
    Views:
    1,716
    Grant Edwards
    Jun 30, 2004
  3. SoftwareTester

    pyserial -- setting DTR_CONTROL_HANDSHAKE

    SoftwareTester, Nov 17, 2004, in forum: Python
    Replies:
    0
    Views:
    927
    SoftwareTester
    Nov 17, 2004
  4. alastair

    pyserial with binary data

    alastair, Nov 26, 2004, in forum: Python
    Replies:
    3
    Views:
    1,625
    Grant Edwards
    Nov 30, 2004
  5. ouz as
    Replies:
    3
    Views:
    805
    Diez B. Roggisch
    Dec 13, 2004
  6. ouz as
    Replies:
    1
    Views:
    1,138
    Diez B. Roggisch
    Dec 14, 2004
  7. Replies:
    3
    Views:
    596
  8. Jean Dupont
    Replies:
    2
    Views:
    457
    Peter
    Feb 8, 2012
Loading...