Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moritznelle/archery_clock_tx
This code is meant for a sending unit in the archery clock network.
https://github.com/moritznelle/archery_clock_tx
archery-clock esp32 microcontroller platformio vscode
Last synced: 10 days ago
JSON representation
This code is meant for a sending unit in the archery clock network.
- Host: GitHub
- URL: https://github.com/moritznelle/archery_clock_tx
- Owner: MoritzNelle
- Created: 2024-04-10T13:49:19.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-11-27T19:34:32.000Z (about 1 month ago)
- Last Synced: 2024-11-27T20:19:19.531Z (about 1 month ago)
- Topics: archery-clock, esp32, microcontroller, platformio, vscode
- Language: C++
- Homepage:
- Size: 42 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Archery Clock
## Introduction
The Archery Clock program is designed to control an archery clock system. It uses an Arduino microcontroller and a NeoPixel LED strip to display timing and group information for archery competitions. The clock provides visual cues for different phases of the competition, including getting to the line, shooting, and group transitions.## Requirements
- Arduino microcontroller, ESP, ...
- The code in `main.cpp` is written for an Arduino Pro Mini, but it can be adapted easily.
- Adafruit NeoPixel LED strip
- Buttons for controlling the clock
- Arduino IDE or PlatformIO## Installation/Deployment
1. Connect the NeoPixel strip to the Arduino as per the hardware setup instructions.
2. Open the `main.cpp` file in the Arduino IDE or PlatformIO.
3. Compile and upload the program to the Arduino.## Usage
The program runs automatically once uploaded to the Arduino. It controls the LED strip to display the timing and group information. The colors and timings can be adjusted in the `main.cpp` file.## Functions
### `setup()`
**Input:** None
**Output:** None
**Calculation:** Initializes the NeoPixel strip, clears any previous entries, and sets up the serial communication. It also sets up the buttons and determines the start phase of the competition.
**Usage:** This function is called once when the program starts. It is responsible for setting up the initial state of the program.### `loop()`
**Input:** None
**Output:** None
**Calculation:** Main program loop. It controls the flow of the competition, including the transitions between different phases.
**Usage:** This function is called repeatedly after `setup()` finishes. It is the main part of the program.### `checkColors()`
**Input:** None
**Output:** None
**Calculation:** Checks the color settings and adjusts them if necessary.
**Usage:** This function is called during the setup phase if `startPhase` is set to 1.### `hold()`
**Input:** None
**Output:** None
**Calculation:** Pauses the program until the hold button is released.
**Usage:** This function is used to pause the program during the setup phase and between different phases of the competition.### `pingPong()`
**Input:** None
**Output:** None
**Calculation:** Controls the ping pong light effect on the LED strip.
**Usage:** This function is used to display a visual effect during the setup phase if `startPhase` is set to 3.### `setPixelColor()`
**Input:** Pixel index, color
**Output:** None
**Calculation:** Sets the color of a specific pixel on the LED strip.
**Usage:** This function is used throughout the program to control the color of the LED strip.For more detailed information about each function, please refer to the inline comments in the `main.cpp` file.