- Clone the Pirate Audio GitHub repo and install:
git clone https://github.com/pimoroni/pirate-audio
cd pirate-audio/mopidy
sudo ./install.sh
Detailed Pirate Audio installation instructions can be found here.
| #!/usr/bin/env python | |
| # Takes a bunch of screenshots from a movie and converts them into a movie barcode. | |
| # You need to capture the screenshots with the command line version of VLC, which should in OS X, | |
| # Windows and Linux (I think). The command (in a terminal) to do this is: | |
| # vlc /path/to/movie/file --video-filter=scene --scene-prefix=movie --scene-ratio=90 --scene-path=/path/to/folder/to/store/images/ | |
| # Note that it plays the movie in real time, so it takes a while. | |
| # You might need to create an alias to vlc with: alias vlc='/Applications/VLC.app/Contents/MacOS/VLC' |
| #!/usr/bin/env python | |
| import unicornhat as unicorn | |
| import time, colorsys | |
| import numpy as np | |
| import random | |
| import skywriter | |
| import signal | |
| unicorn.brightness(0.4) |
| #!/usr/bin/env python | |
| import unicornhat as unicorn | |
| import time, colorsys | |
| import skywriter | |
| import signal | |
| unicorn.brightness(0.4) | |
| unicorn.rotation(270) |
| #!/usr/bin/env python | |
| import unicornhat as unicorn | |
| import time, colorsys | |
| import math | |
| unicorn.brightness(0.5) | |
| def compute_z(x, y, t, pattern): | |
| x = x + t |
| ## This script will turn your Unicorn pHAT or Mood Light Kit into | |
| ## a Twitter-connected mood light that tracks the mood of your most | |
| ## recent tweets. | |
| ## You'll need to install the unicornhat, textblob, and tweepy Python | |
| ## libraries, and run "python -m textblob.download_corpora" to download | |
| ## the corpora for textblob the first time you run it. | |
| ## Change the start_hue and end_hue values to use a different portion of | |
| ## the colour wheel. Change num_tweets to track a larger number of recent |
| #!/usr/bin/env python | |
| import time | |
| from smbus import SMBus | |
| from threading import Thread | |
| import atexit | |
| _bus = None | |
| _t_poll = None | |
| _running = False |
| #!/usr/bin/env python | |
| import time | |
| import math | |
| import colorsys | |
| from lsm303d import LSM303D | |
| from rgbmatrix5x5 import RGBMatrix5x5 | |
| def raw_heading(minimums, maximums, zero=0): | |
| """Return a raw compass heading calculated from the magnetometer data.""" |
git clone https://github.com/pimoroni/pirate-audio
cd pirate-audio/mopidy
sudo ./install.sh
Detailed Pirate Audio installation instructions can be found here.
| #!/bin/bash | |
| DATESTAMP=`date "+%Y-%m-%d-%H-%M-%S"` | |
| MOPIDY_CONFIG="/etc/mopidy/mopidy.conf" | |
| MOPIDY_SUDOERS="/etc/sudoers.d/010_mopidy-nopasswd" | |
| EXISTING_CONFIG=false | |
| PYTHON_MAJOR_VERSION=3 | |
| PIP_BIN=pip3 | |
| function add_to_config_text { |
| // USB MIDI CC controller with Trinket M0 and Pimoroni Potentiometer Breakout. | |
| // Adapted from Chris Parrot's Potentiometer example. | |
| #include <IOExpander.h> | |
| #include <Adafruit_DotStar.h> | |
| #include <MIDIUSB.h> | |
| // Global constants | |
| static const unsigned int DELAY_MS = 1000 / 30; |