[Video] ESP32 - Using displays and the U8g2 library

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

[Video] ESP32 - Using displays and the U8g2 library

Postby kolban » Sun Feb 12, 2017 9:06 pm

The U8g2 library is an open source project for driving monochrome displays. This video tutorial illustrates how to use that library on an ESP32 using ESP-IDF. The video can be found here:

https://www.youtube.com/watch?v=MipOGBStBbI

In the video we reference a hardware abstraction layer that maps U8g2 library operations to the ESP32 hardware. That sample can be found here:

https://github.com/nkolban/esp32-snippe ... plays/U8G2
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

User avatar
pcbreflux
Posts: 28
Joined: Sat Feb 11, 2017 1:00 am
Location: germany
Contact:

Re: [Video] ESP32 - Using displays and the U8g2 library

Postby pcbreflux » Mon Feb 13, 2017 4:53 pm

Hi,

exellent SPI code. Thank you. If I find the time this week I can send you also a I2C version.

User avatar
pcbreflux
Posts: 28
Joined: Sat Feb 11, 2017 1:00 am
Location: germany
Contact:

Re: [Video] ESP32 - Using displays and the U8g2 library

Postby pcbreflux » Wed Feb 15, 2017 11:36 am

Hi,

in addition to your code this is the my first crude I²C, u8g2, esp-idf example on a SSD1306 128x32 OLED display.
https://github.com/pcbreflux/espressif/ ... d_i2c_u8g2
(some Arduino sample code here https://github.com/pcbreflux/espressif/ ... i7021_oled).
Attachments
20170215_122329.jpg
SSD1306 128x32 I2C OLED Display
20170215_122329.jpg (3.51 MiB) Viewed 17387 times

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: [Video] ESP32 - Using displays and the U8g2 library

Postby kolban » Wed Feb 15, 2017 4:13 pm

Very good!!! How would you like to proceed? Do you want to issue a pull request against my sample or do you wish to create your own repository. What I want to avoid if un-needed project fragmentation. I have no need for any personal sense of ownership and am happy to accept any and all pull requests ... or conversely if others (you for example) want to become primary maintainer of a functional area (such as U8glib interfacing) then I am all good with that too. All I would ask is that you yourself accept pull requests and review and act on them promptly.

Neil
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

User avatar
pcbreflux
Posts: 28
Joined: Sat Feb 11, 2017 1:00 am
Location: germany
Contact:

Re: [Video] ESP32 - Using displays and the U8g2 library

Postby pcbreflux » Wed Feb 15, 2017 4:48 pm

thanks, I try a pull request against your sample. but i am more familiar with cvs and subversion, so may I am not able to get it at first glance.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: [Video] ESP32 - Using displays and the U8g2 library

Postby kolban » Wed Feb 15, 2017 5:00 pm

No problems ... if you wish, I'll be delighted to assist ... I can be found on IRC #ESP32 as kolban. Alternative, if you wish, just send me via email a new file (kolban1@kolban.com). Otherwise have a bash at Github ... there is nothing we can break/lose.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

User avatar
pcbreflux
Posts: 28
Joined: Sat Feb 11, 2017 1:00 am
Location: germany
Contact:

Re: [Video] ESP32 - Using displays and the U8g2 library

Postby pcbreflux » Wed Feb 15, 2017 9:00 pm

So my first pull request is online. After reading about forking and branching with git the rest was a piece of cake (for a command-liner).

Thank you.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: [Video] ESP32 - Using displays and the U8g2 library

Postby kolban » Wed Feb 15, 2017 9:35 pm

Request accepted and pull merged ... thank you kind sir. It is all live now.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

User avatar
pcbreflux
Posts: 28
Joined: Sat Feb 11, 2017 1:00 am
Location: germany
Contact:

Re: [Video] ESP32 - Using displays and the U8g2 library

Postby pcbreflux » Thu Feb 16, 2017 4:20 pm

For anyone else with the 128x32 I²C display:

I've done a 10h loop test and my display works even stable with 1Mhz I²C i.e.:
(50kHz was just a test for my function analysis with Sigrok /PulseView)

see u8g2_esp32_hal.h
#define I2C_MASTER_FREQ_HZ 1000000 /*!< I2C master clock frequency */

Who is online

Users browsing this forum: No registered users and 21 guests