So I built something from scratch and it was pretty painful.
And then I found out they have a fully working one. Works like a charm.
Uses I2C and not SPI, but the difference is only one initialization call: disp = u8g.ssd1306_64x48_i2c(sla) replace with the corresponding spi call. And you need to set up SPI of course.
NodeMCU custom build by frightanic.com
build built on: 2016-08-21 21:20
powered by Lua 5.1.4 on SDK 18.104.22.168(39cb9a32)
> PANIC: unprotected error in call to Lua API (app.lua:6: attempt to call field 'ssd1306_128x64_spi' (a nil value))
My init.lua looks like this: http://pastebin.com/UNVM3Ypu
mfny wrote:PANIC: unprotected error in call to Lua API (app.lua:6: attempt to call field 'ssd1306_128x64_spi' (a nil value))
ssd1306_128x64_spi references the specific OLED display. Make sure you include the correct driver when you build the firmware. Also, as per https://nodemcu.readthedocs.io/en/dev/e ... ay-drivers it should be u8g.ssd1306_128x64_hw_spi() (note the extra 'hw_').