Announcement

Collapse
No announcement yet.

Goldelox Python Serial Library

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Goldelox Python Serial Library

    Want to try out the serial interface of a Goldelox display using python?

    Requires PySerial from:
    https://pypi.python.org/pypi/pyserial

    Tested with Pyton2.7 / Windows7 on a uOLED-160-G2 connected with 4D Systems USB dongle.

    Be sure to set the serial port number and baud rate in SampleScript.py (lines16 and 30).

    -Chris

    Attached Files

  • #2
    So im using your code... and i get this error:

    Opened /dev/ttyAMA0
    GoldenEye.py Version:1.1.0
    Press Enter to start demo:
    Turning off the screen saver. Error: sendACK(): ackack(): ACK response timed-out after 4 seconds.0
    Clearing the screen. Error: sendACK(): ackack(): ACK response timed-out after 2 seconds.0
    Lets draw a Blue circle! Error: sendACK(): ackack(): ACK response timed-out after 2 seconds.0
    Getting display model. Error: sys_GetModel(): Failed to retrieve model name.
    Press Enter to kill demo:
    Serial port closed.
    Demo completed...


    I'm running it on a rpi 3 with the uart fix. I do get a circle but it doen't disappear again. My display is a uOled 128 g2. you have any idea what is happening?
    if you need any other info im happy to send it to you.

    -Dennis

    Comment


    • #3
      Hi Dennis,

      It's been a while so some things to consider:

      Are you confident that the serial port is functioning on the RPi? Does a serial loop-back test work (Connect the serial port's Tx pin to the Rx pin)? To be super-safe, use a 300-ohm series resistor to connect Tx to Rx. You could use something like putty as an independent serial-port terminal tester.

      Maybe run the "Serial Environment" in 4D's Workshop IDE to re-jigger the serial interface on your display. Be certain the default baud rate is 9600. See the "Serial Environment" section in http://www.4dsystems.com.au/productp...nual_R_1_7.pdf

      Maybe there's been firmware changes in the displays that have broken something in the python interface over the past year?

      Try removing the call to the screensaver from the example program. Perhaps there's something in particular about one of the commands used in the example script that causes the uOLed128 to break. Power-cycle the display in between tries.

      Are you sure /dev/ttyAMA0 is correct? I don't recognize this port name. However, I've never used a RPi. I would expect soemthing like: /dev/ttyS0.

      *** Also this (from: http://elinux.org/RPi_Serial_Connection): *** Glitch when opening serial port

      When the serial port is opened the voltage on TXD pulses negative for approximately 32

      Comment


      • #4
        Meh. Somehow the lower 1/2 of my last post went away. My money is on the "Glitch when opening a serial port".

        http://elinux.org/RPi_Serial_Connect...ng_serial_port

        ALSO: I just received a panel back from 1 year in the field. Be sure to use the screensaver on these displays, as the longer "On" pixels are obviously dimmer than pixels with less duty cycle. ...a little disappointing. Back to LCD I suppose.

        -Chris

        Comment


        • #5
          Hi Chris,

          Sorry for the long wait. I downloaded the software(4d workplace) and started serial. I found out that you need the designated programming cable from 4d Systems. Is there a way around this? I do have a standard uart rx/tx to usb cable now but that doesnt work.

          When I launch your script now it gives me the error: Bad ACK code received. it does draw a circle however.


          -Dennis

          Comment


          • #6
            Hi Dennis,

            For Logic Level connection (as in, directly connecting to the dio pins of your RPi, with no USB cable):
            You shouldn't need any funny cables. As long as your RPi is outputting ~3.3 to 5 Volts on the pins that your using for the serial port, then everything should be OK.

            Pin1: 5V
            Pin3: DIO Pin set as Serial Receive on your RPi (signals coming INTO the Pi)
            Pin5: DIO Pin set as Serial Transmit on your RPi (signals coming OUT of the Pi)
            Pin7: Ground (same as your RPi and 5V supply).

            If you want to connect via USB, then YES you need an adapter board to convert the USB signals to a logic-level serial port (not RS232). This is more than just voltage and inversion conversion.

            You would also need to do voltage conversion if you use a native RS232 serial port that may be available on the RPi (I don't think that the RPi's have native RS232 ports though).

            What's the difference between logic-level and RS232?
            Logic level is usually low(er) voltage, uni-polar (positive-only) signal levels (like 0 to 3.3V).

            RS232 is:
            https://en.wikipedia.org/wiki/RS-232#Voltage_levels , and is an inverted form of the logic-level signaling.

            While USB is a completely different animal from both of the above.

            The fact that your getting something to partially work is strange. Be certain that the display ground is connected to your RPi ground. Maybe connect up the display's 'Reset' pin (Pin 9) to an RPi dio, and toggle the reset after the port has been opened and setup. This will flush out any garbage that may be sitting in the serial buffer of the display.

            I also make frequent use of a logic analyzer when doing projects like this. Here's one that I've used (no affiliation, ymmv):
            http://www.pctestinstruments.com/

            Best of luck,

            -Chris

            Comment

            Working...
            X