Skip to content

Commit a597b4f

Browse files
committed
Version 1.3
1 parent 374b927 commit a597b4f

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

Diff for: OpenledRace/OpenLedRace.ino

+10-9
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@
8585
//#include "AvrTracing.hpp"
8686

8787
#define VERSION_EXAMPLE "1.3"
88-
// 1.3 VU Bar animations - work in progress
88+
// 1.4 - work in progress
89+
// 1.3 Moved Bridge and loop, VU Bar animations
8990
// 1.2 Improvements from Hannover Maker Faire
9091
// 1.1 Hannover Maker Faire version
9192

@@ -147,7 +148,7 @@ bool sSerialLCDAvailable;
147148
#define PIN_FRICTION A1
148149
#define PIN_DRAG A2
149150

150-
#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.
151+
#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.
151152
bool sOnlyPlotterOutput;
152153

153154
#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();
271272
void checkAndHandleWinner();
272273
void checkForOvertakingLeaderCar();
273274
bool checkAllInputs();
274-
void printConfigPinInfo(uint8_t aConfigPinNumber, const __FlashStringHelper *aConfigPinDescription, Print *aSerial);
275+
void printConfigPinInfo(Print *aSerial, uint8_t aConfigPinNumber, const __FlashStringHelper *aConfigPinDescription);
275276

276277
extern volatile unsigned long timer0_millis; // Used for ATmega328P to adjust for missed millis interrupts
277278

@@ -1043,7 +1044,7 @@ void setup() {
10431044

10441045
pinMode(PIN_RESET_GAME_BUTTON, INPUT_PULLUP);
10451046
pinMode(PIN_MANUAL_PARAMETER_MODE, INPUT_PULLUP);
1046-
pinMode(PIN_ONLY_PLOTTER_OUTPUT, INPUT_PULLUP);
1047+
pinMode(ONLY_PLOTTER_OUTPUT_PIN, INPUT_PULLUP);
10471048

10481049
#if defined(TIMING_TEST)
10491050
pinMode(PIN_TIMING, OUTPUT);
@@ -1058,16 +1059,16 @@ void setup() {
10581059
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!
10591060
#endif
10601061

1061-
sOnlyPlotterOutput = !digitalRead(PIN_ONLY_PLOTTER_OUTPUT);
1062+
sOnlyPlotterOutput = !digitalRead(ONLY_PLOTTER_OUTPUT_PIN);
10621063

10631064
if (!sOnlyPlotterOutput) {
10641065

10651066
// Just to know which program is running on my Arduino
10661067
Serial.println(F("START " __FILE__ " from " __DATE__));
10671068
Serial.println(
10681069
F(
1069-
"Connect pin " STR(PIN_ONLY_PLOTTER_OUTPUT) " to ground, to suppress such prints not suited for Arduino plotter"));
1070-
printConfigPinInfo(PIN_MANUAL_PARAMETER_MODE, F("AnalogParameterInputMode"), &Serial);
1070+
"Connect pin " STR(ONLY_PLOTTER_OUTPUT_PIN) " to ground, to suppress such prints not suited for Arduino plotter"));
1071+
printConfigPinInfo(&Serial, PIN_MANUAL_PARAMETER_MODE, F("AnalogParameterInputMode"));
10711072
}
10721073

10731074
#if defined(ENABLE_ACCELERATOR_INPUT)
@@ -1207,7 +1208,7 @@ void loop() {
12071208
sNextLoopMillis += MILLISECONDS_PER_LOOP;
12081209

12091210
sLoopCountForDebugPrint++;
1210-
sOnlyPlotterOutput = !digitalRead(PIN_ONLY_PLOTTER_OUTPUT);
1211+
sOnlyPlotterOutput = !digitalRead(ONLY_PLOTTER_OUTPUT_PIN);
12111212

12121213
#if defined(INFO) && defined(__AVR__)
12131214
if (!sOnlyPlotterOutput) {
@@ -1597,7 +1598,7 @@ void checkForLCDConnected() {
15971598
#endif
15981599
}
15991600

1600-
void printConfigPinInfo(uint8_t aConfigPinNumber, const __FlashStringHelper *aConfigPinDescription, Print *aSerial) {
1601+
void printConfigPinInfo(Print *aSerial, uint8_t aConfigPinNumber, const __FlashStringHelper *aConfigPinDescription) {
16011602
aSerial->print(F("Pin "));
16021603
aSerial->print(aConfigPinNumber);
16031604
aSerial->print(F(" is"));

Diff for: README.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,15 @@
2020
Also available as [OpenLedRace example](https://github.com/ArminJo/NeoPatterns/tree/master/examples/OpenLedRace) in the [NeoPatterns library](https://github.com/ArminJo/NeoPatterns).
2121

2222
</div>
23+
24+
#### If you find this library useful, please give it a star.
25+
26+
&#x1F30E; [Google Translate](https://translate.google.com/translate?sl=en&u=https://github.com/ArminJo/OpenLedRace)
27+
2328
<br/>
2429

30+
#### If you find this program useful, please give it a star.
31+
2532
# Extensions to standard version
2633
* **Input from MPU6050 Accelerometer**.
2734
* Classes for Car, Bridge, Ramp and Loop with **natural gravity**.
@@ -51,14 +58,14 @@ Formula is: **NewSpeed = OldSpeed + Gravity + Friction + (OldSpeed * Drag)**
5158
<br/>
5259

5360
# Pictures
54-
| At the Hannover MakerFaire 2022 | At the Cologne public library MINTköln-Festival 2021 |
61+
| At the Hannover MakerFaire 2022 | At the Cologne public library MINTk&ouml;ln-Festival 2021 |
5562
| :-: | :-: |
56-
| ![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) |
63+
| ![Accelerometer version from MakerFaire 2022](https://github.com/ArminJo/OpenledRace/blob/master/pictures/Overview.jpg) | ![OpenLedRace at the Cologne public library MINTk&ouml;ln-Festival](https://github.com/ArminJo/OpenledRace/blob/master/pictures/OpenLedRaceAtMintFestival.jpg) |
5764

5865
<br/>
5966

6067
# YouTube Videos
61-
| At the Hannover MakerFaire 2022 | At the Cologne public library MINTköln-Festival 2021 |
68+
| At the Hannover MakerFaire 2022 | At the Cologne public library MINTk&ouml;ln-Festival 2021 |
6269
| :-: | :-: |
6370
| [![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) |
6471

@@ -110,5 +117,3 @@ Pin layout is defined [here](https://github.com/ArminJo/NeoPatterns/blob/master/
110117
- https://twitter.com/openledrace
111118
- https://gitlab.com/open-led-race
112119
- https://openledrace.net/open-software/
113-
114-
#### If you find this program useful, please give it a star.

0 commit comments

Comments
 (0)