Replies: 1 comment 2 replies
-
I recently updated this in #192, but the constructor for I2C is I2CDevice device = new I2CDevice(1, SSD1306.DEFAULT_I2C_ADDRESS);
SsdOledCommunicationChannel channel = new I2cCommunicationChannel(device);
SSD1306 oled = new SSD1306(channel, Height.SHORT);
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I found SSD1306Test but it seems to be only and example using SPI. I'd like to use a SSD1306 display using I2C.
I see a constructor "public SSD1306(SsdOledCommunicationChannel commChannel, Height height) {" but can't figure out the two values to instantiate the object.
Any assistance would be appreciated.
java -cp /home/diozeroProjects/diozero-learn-0.0.1-SNAPSHOT-jar-with-dependencies.jar org.wg.apps.I2CDetect 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1.
I will probe address range 0x03-0x77.
Continue? [Y/n] Y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Closer:
java -cp /home/diozeroProjects/diozero-learn-0.0.1-SNAPSHOT-jar-with-dependencies.jar org.wg.apps.SSD1306Test
20:10:53.380 [main] INFO org.wg.apps.SSD1306Test.main - Sierpinski triangle
20:11:00.332 [main] INFO orgwg.apps.SSD1306Test.main - Displaying custom image
20:11:11.774 [main] INFO org.wg.apps.SSD1306Test.animateText - Font name=Dialog.plain, family=Dialog, size=12, style=0
But no display...this is working on an ESP32 so i know the SSD1306 display is working.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions