Files
drunkendotfiles/vendor/breakout-garden/examples/rainbow-compass
dissimulo 030172f523 Initial backup of LTP-305G matrix clock setup on matrixpi
Captures everything needed to redeploy the two-display clock (hour on I2C
0x61, minute on I2C 0x63) on a fresh Pi:

- Both systemd units (matrix0x61.service, matrix0x63.service)
- Deployed Pimoroni script tree, including the local %I (12-hour) clock
  customization
- Vendored upstream sources (ltp305-python, breakout-garden) so restore is
  fully offline-capable
- Boot config snippet enabling I2C
- install.sh that wires it all back up idempotently
- Inventory doc cross-referencing every live-system path

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 01:32:39 -07:00
..

Rainbow compass example

Calculates and displays compass heading as an RGB colour around the hue wheel, with North being red, South cyan, East green, and West purple, approximately.

Pre-requisites

This example requires:

Installation

Pop the breakouts into your Breakout Garden, and then run the install.sh script in the root of this repository with sudo ./install.sh to automagically install all of the required libraries.

Running this example

To run this example, type ./rainbow-compass.py in the terminal, and then walk through the calibration steps.

Depending on the orientation of you LSM303D breakout, you can change the line that says Y = 2 in the raw_heading function to e.g. Y = 1 if you have the breakout flat rather than vertical.