Commit 00e1e6bc authored by Vowstar's avatar Vowstar
Browse files

Merge pull request #572 from devsaurus/dev

Upgrade u8g module and add display bindings
parents 95ee0c68 31128312
-- ***************************************************************************
-- Rotation Test
--
-- This script executes the rotation features of u8glib to test their Lua
-- integration.
--
-- Note: It is prepared for SSD1306-based displays. Select your connectivity
-- type by calling either init_i2c_display() or init_spi_display() at
-- the bottom of this file.
--
-- ***************************************************************************
-- setup I2c and connect display -- setup I2c and connect display
function init_i2c_display() function init_i2c_display()
...@@ -20,7 +31,7 @@ function init_spi_display() ...@@ -20,7 +31,7 @@ function init_spi_display()
local res = 0 -- GPIO16 local res = 0 -- GPIO16
spi.setup(1, spi.MASTER, spi.CPOL_LOW, spi.CPHA_LOW, spi.DATABITS_8, 0) spi.setup(1, spi.MASTER, spi.CPOL_LOW, spi.CPHA_LOW, spi.DATABITS_8, 0)
disp = u8g.ssd1306_128x64_spi(cs, dc, res) disp = u8g.ssd1306_128x64_hw_spi(cs, dc, res)
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment