Oled Screen
-
@Shamyl-Mansoor I like where you're going with this. I'm assuming you are waiting for a delayed battery dock too.
This could be a handy way to test in the interim! However I'll assume there's some sort of interface the dock brings, which is not included on the minidock
-
@Sawyer-McBride Yup you're right. I am also waiting for the battery dock! My idea was if there is some document for the pin layout of the OLED screen then I could use a breadboard for the OLED to Omega connections. I'm assuming it would use I2C. However I haven't been able to find any pinout diagram for the OLED expansion.
-
The GIT hub link to Python code mentions SSD1306. This is a I2C display. I have used this with a Ardiuno in the past. The pin out is, power, gnd, I2C and I2C clock. Take a look at this picture I found with Google.
If you have a voltmeter you should be able to buzz out the pins.
-
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.