Skip to content

Latest commit

 

History

History
78 lines (54 loc) · 3.15 KB

README.md

File metadata and controls

78 lines (54 loc) · 3.15 KB

MoodCube

3D lattice of RGB LEDs driven by ANN with environmental sensors as inputs

Existing Things

  1. Programmable cube ($390) with Mic and Acc: http://cubetube.org/
  2. http://www.instructables.com/id/8X8X8-RGB-LED-Cube/
  3. NeoPixel (https://learn.adafruit.com/adafruit-neopixel-uberguide/overview) single wire, RGB
  4. Audio Spectrum Analyzer with Pi

Signal Flow

  1. Something acquires a sample each from many sensors
  2. These samples are passed to a Neural Network which does some nonlinear processing on the vector of input time series.
  3. The outputs of the NN are passed to a an output processor, which takes the outputs and writes them to the LEDs. Block diagram

LED Drive

  1. The NeoPixel or DotStar style of Arduino / Raspberry Pi compatible LEDs are a single strip of addressable RGB LEDs.
    1. there are 3rd party products also like HKBAYI
  2. The FadeCandy board takes a USB input and can drive 8 strips having 64 LEDs each. That's a total of 8x64 = 512 LEDs.
    1. could do a cube with 4 sides + 1 top. 10x10 LEDs per side = 500 total.
  3. The LED strips can be mounted on some clear plastic rods so as to make the shape into something like a cube.
    1. use a 3D printer to make some wild shapes to mount it on: trees, spheres, Japanese lantern, Klein bottle
    2. maybe hang them from a frame like Hanging Gardens or the living trees in Avatar
  4. needs ~60 mA per LED for full power. Should use a 5V, 10A AC/DC adapter and a power bus to spread power to each strip.

zoom in on a NeoPixel

Learning

  • stochastic gradient method with least mean squares

synapse sensors (sources)

  • audio data=((CHUNK,), int16), fs=1/CHUNK, (-16k, 16k)
  • audio_blrms:chunk,bands data=((bands,), int16), fs=1/chunk, (-16k, 16k)
  • proximity:fs data=((bands,), int16), fs=fs, (0, 400)
  • date:fs data=(dt.weekday(), dt.hour, dt.minute, dt.second), fs=fs

synapse auto-start with systemd

Both the fcserver and synapse processes will auto-start using the "pi" user system --user session:

  • /home/pi/.config/systemd/user/fcserver.service
  • /home/pi/.config/systemd/user/moodcube.service

The services are called "fcserver" and "moodcube". They launch the following scripts:

  • fcserver: /home/pi/GIT/MoodCube/FadeCandy/fcserver_launch.sh
  • moodcube: /home/pi/GIT/MoodCube/launch

You can control the processes using the "systemctl --user" command. * show service status:

$ systemctl --user status moodcube

  • reload configuration (only needed if you change the config file in ~/.config/systemd/user":

    $ systemctl --user daemon-reload

  • restart service:

    $ systemctl --user restart moodcube

  • stop service:

    $ systemctl --user stop moodcube

  • follow logs:

    $ journalctl -f $ journalctl -f -o cat (more terse)