Oled Screen
-
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.
-
I'm thinking about porting it for using i2cset and i2cget, i actually have one oled hooked up to the onion roght now, but since there's a new lib coming soon, i am feeling a bit lazy... I'll give it a shot though.
-
@Pedro-Baco Good to hear. I tried to use
i2cset
andi2cget
, However, the module returns nothing... I can see the module oni2cdetect
. Could you give me a some advice for it?
-
@Edward-Kim If you want to control it manually with i2cset you can try. You can take a look at the header file for the library that we are currently working on here: https://github.com/OnionIoT/i2c-exp-driver/blob/master/include/oled-exp.h. Some constants we have defined are the value for the commands that you should send to the OLED screen to do certain things.
-
Hurry up with the library guys! I'm thinking of a very very cool project with the OLED screen and don't want to waste my time on figuring out the code to run it! Just need simple function calls to make it work!
-
@Shamyl-Mansoor Yup, we are hurrying! We just need a few more days!