Using a sh1106 OLED on NodeMCU
Posted: Tue Oct 13, 2015 1:30 pm
I tried the dev and master NodeMCU builds on frightanic but none of the builds support the sh1106.
Strange because the dev branch states the u8g.sh1106_128x64_i2c() is among a few other.
-- setup I2c and connect display
function init_i2c_display()
-- SDA and SCL can be assigned freely to available GPIOs
local sda = 3 -- GPIO0
local scl = 4 -- GPIO2
local sla = 0x3c
i2c.setup(0, sda, scl, i2c.SLOW)
disp = u8g.sh1106_128x64_i2c(sla) -- This line causes the error.
end
Display.lua:8: attempt to call field 'sh1106_128x64_i2c' (a nil value)
stack traceback:
Display.lua:8: in function 'init_i2c_display'
Display.lua:145: in main chunk
[C]: in function 'dofile'
stdin:1: in main chunk
I didn't know I was buying an sh1106 instead of the popular SSH1306.
Thanks for your help.
Rolland
Strange because the dev branch states the u8g.sh1106_128x64_i2c() is among a few other.
-- setup I2c and connect display
function init_i2c_display()
-- SDA and SCL can be assigned freely to available GPIOs
local sda = 3 -- GPIO0
local scl = 4 -- GPIO2
local sla = 0x3c
i2c.setup(0, sda, scl, i2c.SLOW)
disp = u8g.sh1106_128x64_i2c(sla) -- This line causes the error.
end
Display.lua:8: attempt to call field 'sh1106_128x64_i2c' (a nil value)
stack traceback:
Display.lua:8: in function 'init_i2c_display'
Display.lua:145: in main chunk
[C]: in function 'dofile'
stdin:1: in main chunk
I didn't know I was buying an sh1106 instead of the popular SSH1306.
Thanks for your help.
Rolland