A toy project to drive Sense Hat's LED matrix by using Go and Svelte.
This project consists of 2 parts:
Enable i2c communication by using raspi-config.
$ sudo raspi-config
# Interface options => I2C => Enable
# To confirm:
# The entry 0x46 should have some value, which indicate existence of AATINY MCU
# https://pinout.xyz/pinout/sense_hat
$ sudo apt install i2c-tools
$ sudo i2cdetect -y 1
Clone and build:
$ sudo apt install -y \
libwebkit2gtk-4.0-dev webkit2gtk-driver
$ git clone https://github.com/bus710/matrixd.git
# For UI
$ cd matrixd/src/ui
$ npm install
$ npm run build
# For service
$ cd ../matrixd
$ make build-arm # or make build-arm64
$ cd bin
$ ./matrixd-arm # or ./matrixd-arm64
The UI looks like the image below and the components have features like these:
With this simple project, the LEDs on Sense Hat can be easily controlled by the web UI but no SDK installation required. However, anyone interests of using Go, Svelte, or the i2c of RPI may check the source code in this repository to add more features.
Disclaimer
This is just a toy project that cannot be used for safety/commercial tasks.
The developer doesn't take any kind of (phsical, mental, and financial) responsibility.