Oled Screen
-
Hi @rahel, are you trying to use Python Mini? I believe the library works only with the full python package.
-
@Shamyl-Mansoor @Sawyer-McBride We're making a simple diagram to show you how to connect your mini dock to your OLED Expansion. We will post it in the next few hours.
Cheers!
-
@Boken-Lin Nice one! Loving the quick turn around with Onion!
-
@Boken-Lin Did you post the diagram yet?
-
@Garling-Beard Not yet. But we haven't forgotten you! Just waiting for a confirmation from our hardware guy to make sure you won't burn your Omega! I will post it as soon as he as confirmed.
-
@Boken-Lin Thanks
-
Edit: I made a mistake on the pin diagram. Please see below for the correct connection.
Sorry!
-
@Boken-Lin Thank you
-
Awesome!!
-
@Boken-Lin, are the red and black connections at the bottom of the diagram correct?
Comparing it to the diagram on the GPIO tool on the Console and the diagram of the Expansion dock, it looks like in this diagram, 2.8V of the Omega (black) is tied to GND of the Oled and GPIO26 of the Omega (red) is tied to 2.5V of the Oled.
The Green, gold and red connections at the top of the diagram make sense, as GPIO20 (I2C_SCL), GPIO21 (I2C_SDA) and 3.3V.
-
@Scott-Smith You are absolutely right! My mistake. I missed the left-most pin on the bottom row of pins on the Omega. This is the correct one:
-
OK, so I've hooked it up, nothing has blown up yet. I've found a couple of commands in /usr/sbin/ which seem to relate.
- i2cdetect - l // shows the device name, mine is i2c-gpio0
- i2cdetect i2c-gpio0 // shows the i2c address of the screen
- i2cdump i2c-gpio0 0x3c // seems to show the screen as a grid
next thing to try is set the screen to something??
-
Also found this on the Git page but not had time to mess with it.
https://github.com/OnionIoT/Python-OLED/blob/master/onion/OLED.py
looks to be a Python library of sorts
-
I've been poking around on the i2c applications, seeing if I can use i2cset to interact with the OLED. So far, nothing.
-
@Andrew-Donnelly, @Sawyer-McBride: The I2C application sends command one at a time to I2C devices like the OLED screen. To get the screen to something, you need to send it a whole sequence of commands. You will be able to see some of these commands by looking at this file: https://github.com/OnionIoT/Python-OLED/blob/master/onion/OLED.py. For example, the command to turn off the display at 0xAE, and the command to invert whatever's shown on the display is 0xA7.
We are just debugging OLED library now, so it will be made available in the next couple of days
-
@Boken-Lin is theree some package (apart python-light) that needs to be installed in order to sue the ptyhon oled code?
When I try to use it I just get error message that sais
Traceback (most recent call last): File "oled.py", line 1, in <module> from onion import I2C ImportError: No module named onion
-
You will need onion lib, where to get it, don't know, try looking in git.
-
@Simon-Yakov The python OLED library is deprecated now. We will have the new OLED library up online very soon.
-
@Simon-Yakov Tried the same and got the same, as it didnt know about the library I knew I needed it but assumed it didnt exist yet.
@Boken-Lin Cheers for the update!
-
@Boken-Lin Could I test the OLED screen with
i2cset
? I want to check that the module is working or not.