No announcement yet.

OLED 128 GMD1, uUSB-CE5, Python & Linux

  • Filter
  • Time
  • Show
Clear All
new posts

  • OLED 128 GMD1, uUSB-CE5, Python & Linux

    When I use under windows my OLED 128 GMD1 via uUSB-CE5 and the 4DS manager it works perfectly.
    When I open a serial connection under linux with a Python script and the uUSB-CE5, the serial connection seems to be opened but when I write commands to the OLED nothing works. I don't have any ACK I only get non sense readings from the serial port.
    For example when doing a simple Erase, the screen freezes and that's all. The only working thing with Python is the Reset via the DTR command.
    This is my python Script :

    import serial
    s = serial.Serial() # create a serial port object
    s.baudrate = 19200 # baud rate, in bits/second
    s.port = "/dev/ttyUSB0" # this is whatever port your are using
    print "Port Open ?", s.isOpen()

    To my point of view it may be a baudrate pb or something with the serial connection under linux. I remember somewhere that there may be a latency with the ftdi driver under linux. (notice that my baudrate is only 9600)

    Can some give me an idea ?

    Thank you

  • #2

    The first serial cammand sent to the display MUST be "U" (0x55) in order for the Autobaud function of the display to determine the proper baud rate. Send the Autobaud command and wait for an ACK (0x06). then send the erase screen command or any other command that you wish.

    A good way to tell if the Autobaud command is accepted is to wait until the splash screen starts to scroll, then send the Autobaud command. If the command is accepted, the scrolling of the splash screen will stop.

    Any technology, sufficiently developed, is indistinguishable from magic. A.C. Clark(RIP)

    NEW! Lower prices on all 4D Systems products for 2009 and continuing into 2010!


    • #3

      It works ! Great !
      Thank you very much Steve.
      Happy new year !