So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Tom Park
#78643 I've been flailing with a tiny ssd1306 display for the ESP8266 and have run into a hurdle that I don't understand. There are tons of examples using the outdated u8g, and lots of examples using Arduino, but precious few for u8g2 and LUA. When I attempt to initialize the display using:
disp = u8g2.ssd1306_i2c_128x64_noname(id,sla) --id=0, sla=0x3c
I get the error:
attempt to call field 'ssd1306_i2c_128x64_noname' (a nil value)
In the u8g2 documentation it says:
Add the desired entries to the I2C or SPI display tables in app/include/u8g2_displays.h.
This sounds like something that must be done when the firmware is built...otherwise, where is the app/include/u8g2_displays.h directory? Is it safe to assume that this happened when the firmware was built (using Marcel Stoer's handy site) since I specified the ssd1306 info? If so, any idea why I'm getting the nil value?
User avatar
By Tom Park
#78662 Discussing the identical issue on github FrankXO said:
-----------------
... judging from the response ('ssd1306_i2c_64x48_er' (a nil value)), this suggests your firmware does not contain the mentioned driver.
Please check your u8g2_displays.h file: is it added to #define U8G2_DISPLAY_TABLE_I2C ?
----------------
The firmware was built using the NodeMCU custom build web site. How do I check the u8g2_displays.h file? Where is it? I was assuming that #define U8G2_DISPLAY_TABLE_I2C was added during the build since I specified ssd1306_i2c_noname. How can I check to see if it's actually included in the firmware?
Tom