-
Notifications
You must be signed in to change notification settings - Fork 6
Home
I just installed Circadia on a new Raspberry Pi 3, here's what I did:
-
Download a recent Raspbian or NOOBS image, install it as usual on your Pi (in my case Noobs 2_1_0)
-
Set up your Wifi connection.
-
run
sudo raspi-config
- enable SSH (if you want to do your work remotely)
- change the password
- disable the boot shell on the serial port
- setup your timezone
- Plug in your USB Sound card
-
see if it's working with any old audio file you can find on the Pi
aplay ./python_games/match1.wav
-
in my case the audio came out of the onboard audio instead of the sound card so I had to create a file called
/etc/asound.conf
and add the following lines to make the usb card the defaultdefaults.ctl.card 1 defaults.pcm.card 1 defaults.pcm.device 0`
you can check the available devices with
aplay -l
(Note, I tried the usual method of creating the file .asoundrc, and this also works, but not for root (sudo) )
- build and install Jeremy Garff's excellent rpi_ws281x library
- Adafruit has a great post about getting it up and running, adafruit
- Connect an LED strip to test with (360 Ohm, 1000uF) and get the strandtest.py to work
-
Download Circadia or use
git clone https://github.com/hooyah/Circadia.git
-
Download some themes to play with, Circadia Themes
-
open the file MSR_HAL/circadia_hw_lamp.py
- set the LED configuration at the top to the values that worked for the strandtest.py
- Open the file circadia_cfg_template.json
- under platform_cfg, raspi change the screen_width and screen_height according to your strip
- change the serial device name to you system's serial port (PI 2=ttyAMA0, PI 3=serial0)
(on a Raspberry Pi 3 the uart is a bit messed up and needs to be dealt with)
enable serial0 uart by settingenable_uart=1
in /boot/config.txt
or don't specify a device with"serial": ""
- save it as circadia_cfg.json
- add the environment variable CIRCADIA_PLATFORM to your env
- I'm using bash so I added the line
export CIRCADIA_PLATFORM="LAMP"
to the top of my .bashrc file - make sure
sudo
is able to see it too (visudo) - run
sudo visudo
and add the lineDefaults env_keep += "CIRCADIA_PLATFORM"
- -X to quit then Y to save
- make sure the variable is there
sudo env|grep CIRCADIA
- Done. Try the alarm app with:
sudo python circadia_alarm.py [themename]