How to use OLED with GPIO
Just getting started with the onion.... And I have the OLED board, but it uses all the pins... how can I do something like get temperature data on a GPIO pin and display the result on the OLED?
@Frank-Blau I am assuming you are using the OLED expansion plugged into the Expansion Dock (or the Power Dock). If so, you are correct, the OLED covers the whole of the GPIO header making it difficult to access the GPIO pins.
Your best bet is probably to get a Proto Expansion (https://onion.io/store/proto-expansion/). This provides a small soldering area with access to all the GPIO pins. You can connect your temperature sensor (etc.) to this.
Then plug the Proto Expansion in to the Expansion Dock first and then plug the OLED on top of the Proto Expansion.
If you have thin enough or stranded wire, you can try squeezing it into the GPIO in the Expansion Header on the Dock and then inserting the OLED pins on top of it. You should be fine just as long as any loose strands of wire do not short or make contact with the other pins on the Expansion.
@Gabriel-Ongpauco Possible - but not highly recommended as a permanent solution :-)
Is there documentation of which pins the OLED is using so you know which pins are available if you insert something in between?
This is probably really obvious, but i couldn't quite figure it out.
@Patrick-Rainsberry The OLED uses I2C, so (as far as I am aware) the only pins you should need to connect are:
- I2C SDA
- I2C SCL
On the Omega2, the position of these pins is shown in https://raw.githubusercontent.com/OnionIoT/Onion-Docs/master/Omega2/Documentation/Hardware-Overview/img/Omega-2-Pinout-Diagram.png which comes from https://docs.onion.io/omega2-docs/omega2.html
Because the OLED is designed to plug in to the Expansion Dock, you can see where the pins are from https://raw.githubusercontent.com/OnionIoT/Onion-Docs/master/Omega2/Documentation/Hardware-Overview/img/expansion-dock-expansion-header-pinout.png which comes from https://docs.onion.io/omega2-docs/expansion-dock.html
You could plug the OLED into a small proto board and the run the 4 wires to the OLED Expansion board.
For reference it appears that:
- I2C SDA
- I2C SCL
- 3.3V (both of them)
- GPIO 11
Are in use.
@Patrick-Rainsberry This is pretty well what I expected except for the usage of GPIO 11 which surprises me
I have access to the circuit diagrams for the Omega1 and Expansion Dock and OLED Expansion
On these, what is marked as GPIO 11 on the pin out diagrams referenced above is used for VDD25 (i.e. 2.5Volt supply) and is used on the OLED Expansion to supply power to level shifters between the I2C signals from the Omega and the OLED display chip.
I am unable to find schematics for the Omega2 (hint to Onion devs:
can we have ALL schematics for the Omega2 and related boards please:-) ) so can't tell whether this has been repurposed for the Omega2 etc. or whether the pin out diagrams for the Omega2 etc in the Omega2 docs referenced above are wrong in this respect