Skip to content

Commit 2c0a4d2

Browse files
committed
Reduce excludes exampled for LibraryBuild
1 parent 9661af9 commit 2c0a4d2

File tree

4 files changed

+28
-9
lines changed

4 files changed

+28
-9
lines changed

Diff for: .github/workflows/LibraryBuild.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
# Copyright (C) 2020 Armin Joachimsmeyer
55
# https://github.com/ArminJo/Github-Actions
6+
# License: MIT
67
#
78
# Before being able to push to my .github\workflows directories,
89
# I had to create a new personal token with workflow enabled at https://github.com/settings/tokens
@@ -21,9 +22,9 @@ jobs:
2122
# Space separated list without double quotes around the list.
2223
# If you need a library with a space in its name, like Adafruit NeoPixel or Adafruit INA219, you must use double quotes
2324
# around the name and have at least 2 entries, where the first must be without double quotes! You may use Servo as dummy entry.
24-
REQUIRED_LIBRARIES:
25+
REQUIRED_LIBRARIES: EspSoftwareSerial
2526

26-
# Output colors
27+
# Global color definitions for output colors
2728
RED: '\033[0;31m'
2829
GREEN: '\033[0;32m'
2930
YELLOW: '\033[1;33m'
@@ -67,18 +68,20 @@ jobs:
6768

6869
- arduino-boards-fqbn: arduino:sam:arduino_due_x
6970
platform: arduino:sam
70-
examples-exclude: Example5_LCDDemo Example6_ArduinoPlotterOutput Example7_Calibration # Space separated list of (unique substrings of) example names to exclude in build
71+
examples-exclude: Example5_LCDDemo # No SoftwareSerial available. Space separated list of (unique substrings of) example names to exclude in build
7172

7273
- arduino-boards-fqbn: esp8266:esp8266:huzzah:eesz=4M3M,xtal=80
7374
platform: esp8266:esp8266
74-
examples-exclude: Example5_LCDDemo # Space separated list of (unique substrings of) example names to exclude in build
7575

7676
- arduino-boards-fqbn: esp32:esp32:featheresp32:FlashFreq=80
7777
platform: esp32:esp32
78-
examples-exclude: Example5_LCDDemo Example6_ArduinoPlotterOutput Example7_Calibration # Space separated list of (unique substrings of) example names to exclude in build
7978

8079
- arduino-boards-fqbn: STM32:stm32:GenF1:pnum=BLUEPILL_F103C8
8180
platform: STM32:stm32
81+
82+
######################################################
83+
# End of configuration, start of fixed script section
84+
######################################################
8285

8386
# Do not cancel all jobs / architectures if one job fails
8487
fail-fast: false

Diff for: examples/Example5_LCDDemo/Example5_LCDDemo.ino

+5-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ SFEVL53L1X distanceSensor;
2626
//Uncomment the following line to use the optional shutdown and interrupt pins.
2727
//SFEVL53L1X distanceSensor(Wire, SHUTDOWN_PIN, INTERRUPT_PIN);
2828

29+
#if defined(ESP8266)
30+
SoftwareSerial lcd(10, 9); // RX, TX
31+
#else
2932
SoftwareSerial lcd(10, A3); // RX, TX
33+
#endif
3034

3135
//Store distance readings to get rolling average
3236
#define HISTORY_SIZE 8
@@ -136,7 +140,7 @@ void loop(void)
136140

137141
instantMPH = abs(instantMPH); //We want to measure as you walk away
138142

139-
ceil(instantMPH); //Round up to the next number. This is helpful if we're not displaying decimals.
143+
instantMPH = ceil(instantMPH); //Round up to the next number. This is helpful if we're not displaying decimals.
140144

141145
if (instantMPH > maxMPH)
142146
{

Diff for: examples/Example6_ArduinoPlotterOutput/Example6_ArduinoPlotterOutput.ino

+7-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ void setup(void) {
4444
// Just to know which program is running on my Arduino
4545
Serial.println(F("START " __FILE__));
4646

47+
#if ! defined (ESP32) && ! defined(ARDUINO_SAM_DUE) && ! defined(__SAM3X8E__)
4748
// test beep for the connected speaker
4849
tone(TONE_PIN,1000,100);
4950
delay(200);
51+
#endif
5052

5153
if (distanceSensor.begin() == 0) { //Begin returns 0 on a good init
5254
Serial.println("Sensor online!");
@@ -89,20 +91,22 @@ void loop(void) {
8991
unsigned int tAmbientRate = distanceSensor.getAmbientRate();
9092

9193
if (rangeStatus == 0) {
94+
#if ! defined (ESP32) && ! defined(ARDUINO_SAM_DUE) && ! defined(__SAM3X8E__)
9295
tone(11, distance + 500);
96+
#endif
9397
} else {
9498
// if tAmbientRate > tSignalRate we likely get a signal fail error condition
95-
// in Distance mode short error 4 (out of bounds) or 7 (wrap around) is thrown if the distance is greater than 1.3 meter.
99+
// in Distance mode short we get error 4 (out of bounds) or 7 (wrap around) if the distance is greater than 1.3 meter.
96100
distance = rangeStatus;
101+
#if ! defined (ESP32) && ! defined(ARDUINO_SAM_DUE) && ! defined(__SAM3X8E__)
97102
noTone(11);
103+
#endif
98104
}
99105

100106
Serial.print(distance);
101107
Serial.print(' ');
102108
Serial.print(tSignalRate / 100);
103109
Serial.print(' ');
104110
Serial.println(tAmbientRate / 100);
105-
106-
107111
}
108112

Diff for: examples/Example7_Calibration/Example7_Calibration.ino

+8
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ void setup(void) {
5252
// Just to know which program is running on my Arduino
5353
Serial.println(F("START " __FILE__ "\r\nVersion " VERSION_EXAMPLE " from " __DATE__));
5454

55+
#if ! defined (ESP32) && ! defined(ARDUINO_SAM_DUE) && ! defined(__SAM3X8E__)
5556
tone(TONE_PIN, 1000, 100);
5657
delay(200);
58+
#endif
5759

5860
Serial.println();
5961
Serial.println("*****************************************************************************************************");
@@ -94,6 +96,7 @@ void setup(void) {
9496
}
9597

9698
Serial.println("Distance below 10cm detected for more than a second, start offset calibration in 5 seconds");
99+
#if ! defined (ESP32) && ! defined(ARDUINO_SAM_DUE) && ! defined(__SAM3X8E__)
97100
tone(TONE_PIN, 1000, 100);
98101
delay(1000);
99102
tone(TONE_PIN, 1000, 100);
@@ -104,6 +107,9 @@ void setup(void) {
104107
delay(1000);
105108
tone(TONE_PIN, 1000, 900);
106109
delay(1000);
110+
#else
111+
delay(5000);
112+
#endif
107113

108114
/*
109115
* Place a target, 17 % gray, at a distance of 140 mm from the sensor and call the VL53L1X_CalibrateOffset (dev, 140, &offset) function.
@@ -127,7 +133,9 @@ void setup(void) {
127133
distanceSensor.setIntermeasurementPeriod(100);
128134
distanceSensor.startRanging(); // Start once
129135

136+
#if ! defined (ESP32) && ! defined(ARDUINO_SAM_DUE) && ! defined(__SAM3X8E__)
130137
tone(TONE_PIN, 1000, 900);
138+
#endif
131139
}
132140

133141
void loop(void) {

0 commit comments

Comments
 (0)