Jul 12, 2016 Replies: 30 This is a wrapper for this open source project: https://github.com/adafruit/Adafruit_SSD1306 It depends on rAdafruitGFX library: https://www.b4x.com/android/forum/threads/radafruitgfx.68904/ It allows drawing graphics and text on supported monochrome OLED modules. I've tested it with an I2C module. You need to pass the I2C address (default is 0x3c) and an available pin (4) in the example. The GFX field from the SSD object is used for the drawings. Code: Copy ssd.GFX.DrawCircle(px, py, radius, ssd.BLACK, True) The drawings will only appear on the module after you call ssd.Display. There are two examples attached. The first is a bouncing ball: The second one, which runs on ESP8266, implements a clock: Attachments BouncingBall.zip BouncingBall.zip 851 bytes · Views: 1,499 Clock.zip Clock.zip 1.8 KB · Views: 1,664 rAdafruitSSD1306.zip rAdafruitSSD1306.zip 33.4 KB · Views: 1,601 Last edited: Aug 16, 2016 Click to expand...
This is a wrapper for this open source project: https://github.com/adafruit/Adafruit_SSD1306 It depends on rAdafruitGFX library: https://www.b4x.com/android/forum/threads/radafruitgfx.68904/ It allows drawing graphics and text on supported monochrome OLED modules. I've tested it with an I2C module. You need to pass the I2C address (default is 0x3c) and an available pin (4) in the example. The GFX field from the SSD object is used for the drawings. Code: Copy ssd.GFX.DrawCircle(px, py, radius, ssd.BLACK, True) The drawings will only appear on the module after you call ssd.Display. There are two examples attached. The first is a bouncing ball: The second one, which runs on ESP8266, implements a clock:
M monki Active Member Licensed User Longtime User Aug 16, 2016 #21 I have update my project with the new library, srolling works perfect many thanks monki
M Mostez Well-Known Member Licensed User Longtime User Aug 17, 2016 #22 Hello, Where can I find the updated lib.
kolbe Active Member Licensed User Longtime User Jun 8, 2017 #24 Erel said: I've updated the library and it now supports scrolling. There was a typo in the previous version. The type name was AdafruitSSD1305 instead of AdafruitSSD1306. This was fixed. You will need to update your existing projects. Click to expand... Would you care to update these libraries again to support the ESP32. I tried swapping the newer libraries with this wrapper but I got a variety of errors I didn't know how to fix.
Erel said: I've updated the library and it now supports scrolling. There was a typo in the previous version. The type name was AdafruitSSD1305 instead of AdafruitSSD1306. This was fixed. You will need to update your existing projects. Click to expand... Would you care to update these libraries again to support the ESP32. I tried swapping the newer libraries with this wrapper but I got a variety of errors I didn't know how to fix.
kolbe Active Member Licensed User Longtime User Jun 8, 2017 #25 kolbe said: Would you care to update these libraries again to support the ESP32. I tried swapping the newer libraries with this wrapper but I got a variety of errors I didn't know how to fix. Click to expand... if you make these changes it compiles and works!
kolbe said: Would you care to update these libraries again to support the ESP32. I tried swapping the newer libraries with this wrapper but I got a variety of errors I didn't know how to fix. Click to expand... if you make these changes it compiles and works!
BaGRoS Active Member Licensed User Longtime User Nov 29, 2017 #27 In my opinion better library especialy for esp8266 is https://github.com/squix78/esp8266-oled-ssd1306 This is still 64x48: Last edited: Nov 29, 2017
In my opinion better library especialy for esp8266 is https://github.com/squix78/esp8266-oled-ssd1306 This is still 64x48:
JMB Active Member Licensed User Longtime User Jul 14, 2018 #28 Hi there, I am trying to use this code to run on d-duino board with a built in display but without success. When I program it from Arduino I have no problems with this code: Code: Copy // Initialize the OLED display using Wire library SSD1306Wire display(0x3c, D1, D2); How does one specify the correct pins for the I2C bus in the provided code? Thanks. JMB
Hi there, I am trying to use this code to run on d-duino board with a built in display but without success. When I program it from Arduino I have no problems with this code: Code: Copy // Initialize the OLED display using Wire library SSD1306Wire display(0x3c, D1, D2); How does one specify the correct pins for the I2C bus in the provided code? Thanks. JMB
Erel B4X founder Staff member Licensed User Longtime User Jul 15, 2018 #29 Try to run the examples based on Adafruit_SSD106 with Arduino IDE: https://github.com/adafruit/Adafruit_SSD1306 Does it work?
Try to run the examples based on Adafruit_SSD106 with Arduino IDE: https://github.com/adafruit/Adafruit_SSD1306 Does it work?
JMB Active Member Licensed User Longtime User Jul 15, 2018 #30 Hmm. No. Those examples do not work with this board. It would appear that it uses a different include file so the AdaFruit wrapper doesn't work.
Hmm. No. Those examples do not work with this board. It would appear that it uses a different include file so the AdaFruit wrapper doesn't work.
Peter Simpson Expert Licensed User Longtime User Jul 15, 2018 #31 JMB said: Hmm. No. Those examples do not work with this board. It would appear that it uses a different include file so the AdaFruit wrapper doesn't work. Click to expand... You should try using 'Inline C' instead. https://www.b4x.com/android/forum/t...-in-oled-display-progress-bar-inline-c.81391/ Also https://www.b4x.com/android/forum/t...led-display-connected-to-wifi-inline-c.81149/
JMB said: Hmm. No. Those examples do not work with this board. It would appear that it uses a different include file so the AdaFruit wrapper doesn't work. Click to expand... You should try using 'Inline C' instead. https://www.b4x.com/android/forum/t...-in-oled-display-progress-bar-inline-c.81391/ Also https://www.b4x.com/android/forum/t...led-display-connected-to-wifi-inline-c.81149/