This is a POV (persistence of vision) display by human-powered swinging.
3 demonstrations are available and it's changed by pressing the button.
- Message mode: display the letters "ATtiny85SwingPOV" with scrolling.
- Counter mode: display the number of how many time it's swinged.
- Graphic mode: various colored OBONOs move up repeatedly.
- ATtiny85
- Optical tilt sensor: RBS32
- NeoPixel Stick (WS2812 × 8)
- Resistors: 220Ω and 15kΩ
- Wires, connectors, a button, a switch, etc...
Install ATTinyCore boards to the Arduino IDE and configure the settings as follows.
Attribute | Value |
---|---|
Board | ATtiny25/45/85 (No bootloader) |
Chip | ATtiny85 |
Clock Source | 8 MHz (Internal) |
Timer 1 Clock | CPU (CPU frequency) |
LTO (1.6.11+ only) | Enabled |
millis()/micros() | Enabled |
Save EEPROM | EEPROM not retained |
B.O.D. Level | B.O.D. Disabled (saves power) |
This sketch depends on following library. (You can add this by library manager)
Also, you should modify "SwingPov.cpp" depending on your hardware.
SWING_TIME_MIN
andSWING_TIME_MAX
: The threshold of each swing time in msec.SWING_PHASE_ADJUST
: The delay to toggle the direction after sensing tilt change by the percentage of each swing time.
These codes are licensed under MIT License.