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>
29 lines
1.1 KiB
Markdown
29 lines
1.1 KiB
Markdown
# 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:
|
|
|
|
- A Pimoroni [Breakout Garden](https://shop.pimoroni.com/products/breakout-garden-hat-i2c-spi)
|
|
- A Pimoroni [LSM303D Motion Sensor Breakout](https://shop.pimoroni.com/products/lsm303d-6dof-motion-sensor-breakout)
|
|
- A Pimoroni [5x5 RGB Matrix Breakout](https://shop.pimoroni.com/products/5x5-rgb-matrix-breakout)
|
|
|
|
## 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.
|