See moonboard repo for original Moonboard app integration and updated problem database.
Moonboard LED DIY is an open source Web-application for driving MoonBoard LEDs. "The Moonboard LED DIY" consist on a webserver (programmed in python using flask) hosted on the Raspberry pi. The webserver host a simple web application (user interface) accessible with a webbrowser. Depending on the user actions the LEDS are driven by the raspberry using the SPI port.
On the raspberry Chromium is automatically loaded at startup and connect automatically to the webserver on localhost:5000
.
Remarks
- The web app is in development status.
- The problems are automatically downloaded from the moon website and stored in a json file. Further improvements is to implement a public database (accesible througth RESTFUL api) to store all sort of moonboard problem data.
- The app has ben developed to work on a raspberry pi with touch screen and chromium webbroser. Other possybilty are welcome
- The Moonboard LED DIY is not compatible with the moonboard app for smartphones.
Hardware requirements:
- Raspberry Pi or similar, necessary an SPI interface for driving the LEDS.
- Touchscreen
- 5V power supply, ~ 20W
- 4x50 LEDs, addressable led pixels. I bought WS2801 LED pixels(4-wire SPI) with custom cable lenght of 25cm on Aliexpress. I was happy with this seller.
Before the listed steps basics setup of the raspberry is necessary(wifi, touchscreen, accounts,...). After:
-
clone git repo on rpi
-
setup python2.7:
- install and setup virtualenvwrapper
- install eventlet and pillow from raspbian repos
sudo apt-get install python-pillow python-eventlet
- install spidev
- create a new virtualenvironmet:
make virtualenv moonboard
- then execute command
toggleglobalsitepackages
- install required packages:
mkvirtualenv -r requirements.txt moonboardvenv
-
create systemd rule to run server script at statup, similar to this guide. ``` [Unit] # sve file at /lib/systemd/system/moonboard_led_server.service Description=moonboard server service After=multi-user.target
[Service] Type=idle ExecStart=/home/pi/.virtualenvs/moonboard/bin/python2.7 /home/pi/moonboard-app/run.py [Install] WantedBy=multi-user.target ```
-
Enable spi on rpi (raspy-config)
-
Connect LEDS (wire power supply directly to led strips)
Optional steps 7. Setup Rpi to start Chromium in kiosk mode at startup. Follow link1, link2
- Setup rpi to periodically update the problem list. Create crontab job which run the moonboard_problems.py script.
crontab -e
- Add shutdown button as in this link
you are all welcome! and of course enjoy the app!