Skip to content
The Raspberry PI IOT for reading messages off of a queue
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


allows a raspberry pi to drive an LED display as an IOT divide in AWS. The idea is to make a IOT thing that is basically just a slave to the messages sent to a queue. This allows the device to be dumb and multiple suppliers to be as sophisticated as needed.

research and background

These are the guides that accelerated building this project extensively.

install for python 3

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

installing flashlex-pi-python

This is a flashlex project. That is it uses the flashlex cloud IOT framework to send messages to the Raspberry Pi. You can get more info on flashlex at

git clone
cd flashlex-iot-python
sudo python install

running on cli

sudo /home/pi/projects/ledticker-pi/venv/bin/python -u /home/pi/projects/ledticker-pi/ --led-no-hardware-pulse true -m adafruit-hat -r 32 --led-cols 32 --log DEBUG --config /home/pi/projects/ledticker-pi/config.yml 

creating the systemd service

Instructions for setting up your service can be found at

sudo cp ledticker.service /lib/systemd/system/ledticker.service
sudo chmod 644 /lib/systemd/system/ledticker.service
sudo systemctl daemon-reload
sudo systemctl enable ledticker.service

add logging to syslog

Then, assuming your distribution is using rsyslog to manage syslogs, create a file in /etc/rsyslog.d/<new_file>.conf with the following content:

if $programname == '<your program identifier>' then /path/to/log/file.log
& stop

restart rsyslog (sudo systemctl restart rsyslog) and enjoy! Your program stdout/stderr will still be available through journalctl (sudo journalctl -u <your program identifier>) but they will also be available in your file of choice.

We have included a conf file that makes this easier. Use the instructions below to enable rsyslog for ledticker.

sudo cp ledticker.conf /etc/rsyslog.d/ledticker.conf
sudo systemctl daemon-reload
sudo systemctl restart ledticker.service
sudo systemctl restart rsyslog

check the status of the service

sudo systemctl status ledticker.service

rotating logs

you will want to rotate logs so your disk doesnt fill up with logs. your conf file for logrotation looks like this in /etc/logrotate.conf:

/var/log/ledticker.log {
    rotate 7
    maxage 7

make a crontab that executes logrotate daily

/usr/sbin/logrotate /etc/logrotate.conf
You can’t perform that action at this time.