diff options
Diffstat (limited to 'display_setup.lua')
-rw-r--r-- | display_setup.lua | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/display_setup.lua b/display_setup.lua deleted file mode 100644 index 78dfb21..0000000 --- a/display_setup.lua +++ /dev/null @@ -1,30 +0,0 @@ --- setup I2c and connect display -function init_i2c_display() - -- Pinsa are hardwired on the oled display shield - local sda = 2 -- GPIO14 - local scl = 1 -- GPIO12 - local sla = 0x3c -- 0x3c or 0x3d - i2c.setup(0, sda, scl, i2c.SLOW) - -- old 1.5.1 nodemcu firmware - -- disp = u8g.ssd1306_64x48_i2c(sla) - -- new 3.0.0 nodemcu firmware - disp = u8g2.ssd1306_i2c_64x48_er(0, sla) -end - -function prepare() - -- old 1.5.1 nodemcu firmware - --disp:setFont(u8g.font_6x10) - --disp:setFontRefHeightExtendedText() - --disp:setDefaultForegroundColor() - --disp:setFontPosTop() - -- old 3.0.0 nodemcu firmware - disp:setFont(u8g2.font_6x10_tf) - disp:setFontRefHeightExtendedText() - disp:setDrawColor(1) - disp:setFontPosTop() -end - -init_i2c_display() -prepare() - - |