Skip to content

Commit e90dfd6

Browse files
committed
Update docs
1 parent 3fb3be7 commit e90dfd6

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ X4 code has been migrated to a separate repo - https://github.com/openppg/x4-con
1010

1111
It may not be stable and is not recommended for flying.
1212
See stable releases [here](https://github.com/openppg/eppg-controller/releases)
13+
> Version 6.1 was intially released only for the reworked RP2040 module based controller and being ported to the original RP2040 PCB which is currently in testing. The version shipped with that hardware can be found on the [rp2040-module-release branch](https://github.com/openppg/eppg-controller/tree/rp2040-module-release)
1314
1415
> Version 6.0 introduced [FreeRTOS](https://www.freertos.org/index.html) and is currently only working with RP2040 processors. For M0/SAMD21 processors please use [version/5 branch](https://github.com/openppg/eppg-controller/tree/version/5).
1516
@@ -38,7 +39,7 @@ Suitable for Mac, Windows, and Linux
3839
#### Install the driver
3940

4041
Batch 3+ OpenPPG controllers and early SP140 controllers are powered by Atmel’s SAMD21G18A MCU, featuring a 32-bit ARM Cortex® M0+ core. On some operating systems you may need extra drivers to communicate with it.
41-
Newer SP140 controllers feature the RP2040 MCU which is a dual-core variant of the ARM Cortex® M0+.
42+
Newer SP140 controllers feature the RP2040 MCU which is a dual-core variant of the ARM Cortex® M0+.
4243

4344
#### Download and Prepare OpenPPG Code
4445

src/sp140/utilities.ino

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,26 @@ String convertToDigits(byte digits) {
2222
return digits_string;
2323
}
2424

25+
#define ENABLE_NEOPIXEL true
26+
27+
// set LED color
28+
void setLEDColor(uint32_t color) {
29+
if (ENABLE_NEOPIXEL) {
30+
led_color = color;
31+
pixels.setPixelColor(0, color);
32+
pixels.show();
33+
}
34+
}
35+
36+
/**
37+
* Sets the state of the LEDs.
38+
*
39+
* If ENABLE_NEOPIXEL is true, sets the color of the NeoPixel LED to led_color
40+
* when the state is HIGH, and clears the NeoPixel LED when the state is LOW.
41+
* Otherwise, sets the state of the LED_SW pin to the given state.
42+
*
43+
* @param state The state to set the LEDs to (HIGH or LOW).
44+
*/
2545
void setLEDs(byte state) {
2646
// digitalWrite(LED_2, state);
2747
// digitalWrite(LED_3, state);
@@ -44,6 +64,13 @@ bool runVibe(unsigned int sequence[], int siz) {
4464
return true;
4565
}
4666

67+
/**
68+
* Plays a melody using a piezo buzzer.
69+
*
70+
* @param melody An array of uint16_t values representing the notes of the melody.
71+
* @param siz The size of the melody array.
72+
* @return Returns true if the melody was played successfully, false otherwise.
73+
*/
4774
bool playMelody(uint16_t melody[], int siz) {
4875
if (!ENABLE_BUZ) { return false; }
4976
for (int thisNote = 0; thisNote < siz; thisNote++) {
@@ -62,6 +89,9 @@ void playNote(uint16_t note, uint16_t duration) {
6289
noTone(BUZZER_PIN);
6390
}
6491

92+
/**
93+
* Plays a melody to indicate arm failure.
94+
*/
6595
void handleArmFail() {
6696
uint16_t arm_fail_melody[] = { 820, 640 };
6797
playMelody(arm_fail_melody, 2);

0 commit comments

Comments
 (0)