The examples can be compiled and uploaded using the Arduino IDE.
.ino
.Upload the I2C_Slave.ino
example to the ATtiny85 on the RPi-WS2812-HAT.
Install i2c-tools and python-smbus:
$ sudo apt-get install i2c-tools
$ sudo apt-get install python-smbus
Activate I2C device:
$ sudo modprobe i2c_bcm2708 baudrate=400000
$ sudo modprobe i2c-dev
Note: For a Device Tree Kernel add to /boot/config.txt
the following line: dtparam=i2c1
(before any dtoverlay statement).
Test I2C bus:
$ sudo i2cdetect -y 1
Download and run the Python examples (Random.py
, Fill.py
…):
$ wget https://github.com/watterott/RPi-WS2812-HAT/raw/master/software/Random.py
$ sudo python Random.py