diff --git a/OpenledRace/OpenLedRace.ino b/OpenledRace/OpenLedRace.ino
index 724494e..c390860 100644
--- a/OpenledRace/OpenLedRace.ino
+++ b/OpenledRace/OpenLedRace.ino
@@ -85,7 +85,8 @@
//#include "AvrTracing.hpp"
#define VERSION_EXAMPLE "1.3"
-// 1.3 VU Bar animations - work in progress
+// 1.4 - work in progress
+// 1.3 Moved Bridge and loop, VU Bar animations
// 1.2 Improvements from Hannover Maker Faire
// 1.1 Hannover Maker Faire version
@@ -147,7 +148,7 @@ bool sSerialLCDAvailable;
#define PIN_FRICTION A1
#define PIN_DRAG A2
-#define PIN_ONLY_PLOTTER_OUTPUT 12 // Verbose output to Arduino Serial Monitor is disabled, if connected to ground. This is intended for Arduino Plotter mode.
+#define ONLY_PLOTTER_OUTPUT_PIN 12 // Verbose output to Arduino Serial Monitor is disabled, if connected to ground. This is intended for Arduino Plotter mode.
bool sOnlyPlotterOutput;
#define ANALOG_OFFSET 20 // Bias/offset to get real 0 analog value, because of high LED current on Breadboard, which cause a ground bias.
@@ -271,7 +272,7 @@ void playMelodyAndShutdown();
void checkAndHandleWinner();
void checkForOvertakingLeaderCar();
bool checkAllInputs();
-void printConfigPinInfo(uint8_t aConfigPinNumber, const __FlashStringHelper *aConfigPinDescription, Print *aSerial);
+void printConfigPinInfo(Print *aSerial, uint8_t aConfigPinNumber, const __FlashStringHelper *aConfigPinDescription);
extern volatile unsigned long timer0_millis; // Used for ATmega328P to adjust for missed millis interrupts
@@ -1043,7 +1044,7 @@ void setup() {
pinMode(PIN_RESET_GAME_BUTTON, INPUT_PULLUP);
pinMode(PIN_MANUAL_PARAMETER_MODE, INPUT_PULLUP);
- pinMode(PIN_ONLY_PLOTTER_OUTPUT, INPUT_PULLUP);
+ pinMode(ONLY_PLOTTER_OUTPUT_PIN, INPUT_PULLUP);
#if defined(TIMING_TEST)
pinMode(PIN_TIMING, OUTPUT);
@@ -1058,7 +1059,7 @@ void setup() {
delay(4000); // To be able to connect Serial monitor after reset or power up and before first print out. Do not wait for an attached Serial Monitor!
#endif
- sOnlyPlotterOutput = !digitalRead(PIN_ONLY_PLOTTER_OUTPUT);
+ sOnlyPlotterOutput = !digitalRead(ONLY_PLOTTER_OUTPUT_PIN);
if (!sOnlyPlotterOutput) {
@@ -1066,8 +1067,8 @@ void setup() {
Serial.println(F("START " __FILE__ " from " __DATE__));
Serial.println(
F(
- "Connect pin " STR(PIN_ONLY_PLOTTER_OUTPUT) " to ground, to suppress such prints not suited for Arduino plotter"));
- printConfigPinInfo(PIN_MANUAL_PARAMETER_MODE, F("AnalogParameterInputMode"), &Serial);
+ "Connect pin " STR(ONLY_PLOTTER_OUTPUT_PIN) " to ground, to suppress such prints not suited for Arduino plotter"));
+ printConfigPinInfo(&Serial, PIN_MANUAL_PARAMETER_MODE, F("AnalogParameterInputMode"));
}
#if defined(ENABLE_ACCELERATOR_INPUT)
@@ -1207,7 +1208,7 @@ void loop() {
sNextLoopMillis += MILLISECONDS_PER_LOOP;
sLoopCountForDebugPrint++;
- sOnlyPlotterOutput = !digitalRead(PIN_ONLY_PLOTTER_OUTPUT);
+ sOnlyPlotterOutput = !digitalRead(ONLY_PLOTTER_OUTPUT_PIN);
#if defined(INFO) && defined(__AVR__)
if (!sOnlyPlotterOutput) {
@@ -1597,7 +1598,7 @@ void checkForLCDConnected() {
#endif
}
-void printConfigPinInfo(uint8_t aConfigPinNumber, const __FlashStringHelper *aConfigPinDescription, Print *aSerial) {
+void printConfigPinInfo(Print *aSerial, uint8_t aConfigPinNumber, const __FlashStringHelper *aConfigPinDescription) {
aSerial->print(F("Pin "));
aSerial->print(aConfigPinNumber);
aSerial->print(F(" is"));
diff --git a/README.md b/README.md
index 3bf6579..f275126 100644
--- a/README.md
+++ b/README.md
@@ -20,8 +20,15 @@
Also available as [OpenLedRace example](https://github.com/ArminJo/NeoPatterns/tree/master/examples/OpenLedRace) in the [NeoPatterns library](https://github.com/ArminJo/NeoPatterns).
+
+#### If you find this library useful, please give it a star.
+
+🌎 [Google Translate](https://translate.google.com/translate?sl=en&u=https://github.com/ArminJo/OpenLedRace)
+
+#### If you find this program useful, please give it a star.
+
# Extensions to standard version
* **Input from MPU6050 Accelerometer**.
* Classes for Car, Bridge, Ramp and Loop with **natural gravity**.
@@ -51,14 +58,14 @@ Formula is: **NewSpeed = OldSpeed + Gravity + Friction + (OldSpeed * Drag)**
# Pictures
-| At the Hannover MakerFaire 2022 | At the Cologne public library MINTköln-Festival 2021 |
+| At the Hannover MakerFaire 2022 | At the Cologne public library MINTköln-Festival 2021 |
| :-: | :-: |
-| ![Accelerometer version from MakerFaire 2022](https://github.com/ArminJo/OpenledRace/blob/master/pictures/Overview.jpg) | ![OpenLedRace at the Cologne public library MINTköln-Festival](https://github.com/ArminJo/OpenledRace/blob/master/pictures/OpenLedRaceAtMintFestival.jpg) |
+| ![Accelerometer version from MakerFaire 2022](https://github.com/ArminJo/OpenledRace/blob/master/pictures/Overview.jpg) | ![OpenLedRace at the Cologne public library MINTköln-Festival](https://github.com/ArminJo/OpenledRace/blob/master/pictures/OpenLedRaceAtMintFestival.jpg) |
# YouTube Videos
-| At the Hannover MakerFaire 2022 | At the Cologne public library MINTköln-Festival 2021 |
+| At the Hannover MakerFaire 2022 | At the Cologne public library MINTköln-Festival 2021 |
| :-: | :-: |
| [![OpenLedRace at the Hannover MakerFaire 2022](https://i.ytimg.com/vi/lYzYpFYJfWI/hqdefault.jpg)](https://www.youtube.com/watch?v=lYzYpFYJfWI) | [![OpenLedRace in action](https://i.ytimg.com/vi/y25rjRkDg0g/hqdefault.jpg)](https://www.youtube.com/watch?v=y25rjRkDg0g) |
@@ -110,5 +117,3 @@ Pin layout is defined [here](https://github.com/ArminJo/NeoPatterns/blob/master/
- https://twitter.com/openledrace
- https://gitlab.com/open-led-race
- https://openledrace.net/open-software/
-
-#### If you find this program useful, please give it a star.