Actually, this project is closed, because on hackaday it is declared as a pure hardware project. All further work will be realized in the github repo (runningLightBox). But because so many of you are following now this project, I thought to write how I am programming the Raspi.
In the beginning I thought to use Visual Studio Code with the remote server, but then I decided to keep everything simple and mount the working folder form my laptop to the Raspi.
Raspi Part
- Install nfs-common
sudo apt install nfs-common
Create a directory for mounting
sudo mkdir /var/runningLightBox
Define what should be mounted where via fstab file
sudo nano /etc/fstab
File looks then like this:
# <file system> <dir> <type> <options> <dump> <pass>
<IP_OF_LAPTOP>:<LINK_TO_WORK_FOLDER> /var/runningLightBox/ nfs defaults 0 0
Laptop Part
- Install NFS server
sudo apt-get install nfs-kernel-server
- Define which folder is allowed to be used by whom via export file
sudo nano /etc/exports
File looks then like this:
<LINK_TO_WORK_FOLDER> <IP_OF_RASPI> (rw)
NOTE: Laptop must be booted first! (I know it's logical, but ....)
Before I wrote a python script, I first tested the LEDs with the i2ctools:
Get all I2C devices on the I2C1
i2cdetect -y 1
Set all pins of port A of the first segment to output
i2cset -y 1 0x20 0x00 0x00
Turn on all LEDs of port A of the first segment
i2cset -y 1 0x20 0x14 0x00
Turn off all LEDs of port A of the first segment
i2cset -y 1 0x20 0x14 0xFF
- Repeat last three steps above for all other devices
There is also a python script in the github repo (runningLightBox).
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.