Friday, April 12, 2019

Blinkt! on a Pine Rock64

Blinkt! on a Rock64

Small write up and reminder to myself: how to install the Blinkt by Pimoroni and get it to work on a Pine Rock64:
rock64@bcn0:~$ sudo apt install python-pip rock64@bcn0:~$ sudo apt install python-dev python-setuptools rock64@bcn0:~$ sudo pip install --upgrade setuptools rock64@bcn0:~$ sudo pip install wheel rock64@bcn0:~$ sudo pip install psutil rock64@bcn0:~$ git clone https://github.com/Leapo/Rock64-R64.GPIO.git rock64@bcn0:~$ git clone https://github.com/pimoroni/blinkt.git

Then, edit the setup.py file in the ~/blinkt/library directory, and change line 52
from:
install_requires=['RPi.GPIO']
to:
install_requires=['R64.GPIO']

Save the file. Now edit blinkt.py, change line 5 into:
import R64.GPIO as GPIO

alter line 10:
DAT = 16

alter line 11:
CLK = 18

alter line 82:
GPIO.setmode(GPIO.BOARD)

Save the file. Now, install this library:
cd /Rock64-GPIO sudo python setup.py install

Examples form ~/blinkt/examples should now work, apart from some specific, board dependant features:
~/Rock64-R64.GPIO$ sudo python solid_colours.py

No comments: