Skip to content

This is a project to construct and build a word clock using a raspberry pi zero and the adafruid neopixels.

License

Notifications You must be signed in to change notification settings

konsultaner/word-clock-raspberry-pi-zero-neopixels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wordclock with neopixels

This is a project to construct and build a word clock using a raspberry pi zero and the adafruid neopixels. This project is currently in progress. The repository will document the current work.

To use the the great library rpi_ws291x this project adds a Java-Wrapper.

Parts list

Wireing the PI

The wiring is done how it is explained in the adafruit guide This is my result for the demo:

Setting up the PI

  1. Setup an evironment where the pi is accessible through ssh. There are several guides on the web that explain how to setup the pi.

  2. Assigning PWM0 and PWM1 pins to GPIO 18 and 13. The NeoPixel protocol will be controlled by the raspi's sound output. To make the raspi ouput the signal to the GPIO 18 and 13, we need to digitally wire them up. These steps are copied from this guide

    1. sudo apt-get update
    2. sudo apt-get install git-core
    3. git clone git://git.drogon.net/wiringPi
    4. cd ~/wiringPi
    5. ./build
    6. test the installation with gpio -v
    7. Copy the gpio_alt.c code from this repo to your folder on the pi
    8. gcc -o gpio_alt gpio_alt.c
    9. sudo chown root:root gpio_alt
    10. sudo chmod u+s gpio_alt
    11. sudo mv gpio_alt /usr/local/bin/
    12. now the script to wire up the GPIO has been compiled and installed
    13. wire them up
    14. gpio_alt -p 13 -f 0
    15. gpio_alt -p 18 -f 5
  3. Now the pi is setup to output your signals to the stripe. To test the wiring and setup clone the rpi_ws281x repository and run the test

    1. sudo apt-get install scons
    2. https://github.com/jgarff/rpi_ws281x
    3. cd rpi_ws281x
    4. nano main.c Change the strip height to 1 and the width to something like 100 and set the STRIP_TYPE to SK6812_STRIP_RGBW
    5. scons this runs the compiler
    6. sudo ./test you should see a running led snake
  4. If the test was successful add the java wrapper to code the clock

    1. scons . to compile the so file and copy libws2811.so to /usr/local/bin/libws2811.so with sudo cp ~/rpi_ws281x/libws2811.so /usr/local/bin/libws2811.so
    2. install java 8 sudo apt-get install oracle-java8-jdk
    3. execute mv compile assembly:single from inside the root of this repo and copy out/build/ws2811.jar to the raspi.
    4. run java -cp ws2811.jar de.konsultaner.demo.Main
    5. Result:

About

This is a project to construct and build a word clock using a raspberry pi zero and the adafruid neopixels.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published