POC integration of u8g2 library with LuaJIT ffi
You need the following line in /boot/config.txt
:
dtparam=i2c_arm=on
You need the following line in /etc/modules
:
i2c-dev
Remove any other i2c related lines.
Reboot.
Add /etc/udev/rules.d/51-i2c.rules
:
KERNEL=="i2c*", GROUP="users", MODE="0660"
On Raspbian Stretch the I2C bus 1 (/dev/i2c-1
) is available at the follwing pins:
- SDA: GPIO2 / pin 3
- SCL: GPIO3 / pin 5
sudo apt -y install luajit lua5.1 luarocks
sudo luarocks install lua-periphery
Use make download
to download u8g2 v2.21.8 and c-periphery v1.1.1 source releases once.
Type make
to compile to library build/u8g2.so
.
See test_u8g2.lua
.