Skip to content

Commit 9c69db2

Browse files
authored
Merge pull request #17 from arduino-libraries/v0.9.7-b
V0.9.8
2 parents d3d8f42 + cc3b1fe commit 9c69db2

File tree

28 files changed

+89
-60
lines changed

28 files changed

+89
-60
lines changed

Readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Read more about the Kits:
1010

1111

1212
For more information about this library please visit us at
13-
https://www.arduino.cc/reference/en/libraries/arduino_mkriotcarrier/
13+
http://www.arduino.cc/en/Reference/MKRIoTCarrier
1414

1515
## License
1616

examples/Actuators/Buzzer_Melody/Buzzer_Melody.ino

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "pitches.h"
99

1010
MKRIoTCarrier carrier;
11-
bool CARRIER_CASE = false;
1211

1312
// notes in the melody:
1413
int melody[] = {
@@ -21,6 +20,9 @@ int noteDurations[] = {
2120
};
2221

2322
void setup() {
23+
CARRIER_CASE = false;
24+
carrier.begin();
25+
2426
// iterate over the notes of the melody:
2527
for (int thisNote = 0; thisNote < 8; thisNote++) {
2628

examples/Actuators/Relays_blink/Relays_blink.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#include <Arduino_MKRIoTCarrier.h>
22

33
MKRIoTCarrier carrier;
4-
bool CARRIER_CASE = false;
54

65
void setup() {
76

87
Serial.begin(9600);
98
Serial.println("Init");
9+
CARRIER_CASE = false;
1010
carrier.begin();
1111
}
1212

examples/All_Features/All_Features.ino

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ Unless the touch pads
66
#include <Arduino_MKRIoTCarrier.h>
77
MKRIoTCarrier carrier; //Constructor of the carrier maybe we can include it on the library itself
88

9-
//Set the pad sense distance for using them with or without the enclosure
10-
bool CARRIER_CASE = false;
11-
129
float temperature;
1310
float humidity;
1411

@@ -27,6 +24,7 @@ void setup() {
2724
while (!Serial); //Wait to open the Serial monitor to start the program and see details on errors
2825

2926
//Init everything and outputs the errors
27+
CARRIER_CASE = false;
3028
carrier.begin();
3129
}
3230

examples/Display/Compose_images/Compose_images.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
#include <Arduino_MKRIoTCarrier.h>
1111
MKRIoTCarrier carrier;
1212

13-
bool CARRIER_CASE = false;
1413

1514
uint32_t orange = carrier.leds.Color(50, 242, 0);
1615

1716
void setup() {
1817
Serial.begin(9600);
18+
CARRIER_CASE = false;
1919
carrier.begin();
2020

2121
uint16_t time = millis();

examples/Display/Graphics/Graphics.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
MKRIoTCarrier carrier;
77

88
float p = 3.1415926;
9-
bool CARRIER_CASE = false;
109

1110
void setup(void) {
1211

1312
Serial.begin(9600);
1413
Serial.print(F("Hello! ST77xx TFT Test"));
14+
CARRIER_CASE = false;
1515
carrier.begin();
1616

1717
uint16_t time = millis();

examples/Grove_Inputs/Grove_Inputs.ino

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#include <Arduino_MKRIoTCarrier.h>
22
MKRIoTCarrier carrier; //Constructor of the carrier maybe we can include it on the library itself
33

4-
//Set the pad sense distance for using them with or without the enclosure
5-
bool CARRIER_CASE = false;
6-
74
//Be sure that the Pins are the same as your wiring
85
int moisture = A5;
96
int moist;
@@ -14,6 +11,7 @@ void setup() {
1411
// put your setup code here, to run once:
1512
Serial.begin(9600);
1613
while(!Serial);
14+
CARRIER_CASE = false;
1715
carrier.begin();
1816
pinMode(moisture,INPUT);
1917
pinMode(pir,INPUT);

examples/LEDs-Examples/strandtest/strandtest.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#include <Arduino_MKRIoTCarrier.h>
22
MKRIoTCarrier carrier;
3-
bool CARRIER_CASE;
43

54
#define NUMPIXELS 5
65

76
void setup() {
7+
CARRIER_CASE = false;
88
carrier.begin();
99
}
1010

examples/SD_card/SD_card.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include <Arduino_MKRIoTCarrier.h>
22
MKRIoTCarrier carrier;
3-
bool CARRIER_CASE = false;
43

54
File myFile;
65

@@ -12,6 +11,7 @@ void setup() {
1211
}
1312

1413
// Init the entire Carrier
14+
CARRIER_CASE = false;
1515
carrier.begin();
1616

1717
// open the file. note that only one file can be open at a time,

examples/Sensors/ENV-HTS221/ReadSensors/ReadSensors.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
#include <Arduino_MKRIoTCarrier.h>
66
MKRIoTCarrier carrier;
7-
bool CARRIER_CASE = false;
87

98

109
void setup() {
1110
Serial.begin(9600);
1211
while (!Serial);
1312

13+
CARRIER_CASE = false;
1414
carrier.begin();
1515
}
1616

examples/Sensors/ENV-HTS221/ReadSensorsImperial/ReadSensorsImperial.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
#include <Arduino_MKRIoTCarrier.h>
77
MKRIoTCarrier carrier;
8-
bool CARRIER_CASE = false;
98

109
void setup() {
1110
Serial.begin(9600);
1211
while (!Serial);
1312

13+
CARRIER_CASE = false;
1414
carrier.begin();
1515
}
1616

examples/Sensors/IMU-LSM6DS3/SimpleAccelerometer/SimpleAccelerometer.ino

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include <Arduino_MKRIoTCarrier.h>
1818
MKRIoTCarrier carrier;
19-
bool CARRIER_CASE = false;
2019

2120
void setup() {
2221
Serial.begin(9600);

examples/Sensors/IMU-LSM6DS3/SimpleGyroscope/SimpleGyroscope.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717
#include <Arduino_MKRIoTCarrier.h>
1818
MKRIoTCarrier carrier;
19-
bool CARRIER_CASE = false;
2019

2120
void setup() {
2221
Serial.begin(9600);
2322
while (!Serial);
2423

24+
CARRIER_CASE = false;
2525
if (!carrier.begin()) {
2626
Serial.println("Failed to initialize!");
2727

examples/Sensors/Light-APDS9960/FullExample/FullExample.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717
#include <Arduino_MKRIoTCarrier.h>
1818
MKRIoTCarrier carrier;
19-
bool CARRIER_CASE = false;
2019

2120
void setup() {
2221
Serial.begin(9600);
2322
while (!Serial); // Wait for serial monitor to open
2423

24+
CARRIER_CASE = false;
2525
if (!carrier.begin()) {
2626
Serial.println("Error");
2727
while (true); // Stop forever

examples/Sensors/Light-APDS9960/GestureSensor/GestureSensor.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818

1919
#include <Arduino_MKRIoTCarrier.h>
2020
MKRIoTCarrier carrier;
21-
bool CARRIER_CASE = false;
2221

2322
void setup() {
2423
Serial.begin(9600);
2524
while (!Serial);
2625

26+
CARRIER_CASE = false;
2727
if (!carrier.begin()) {
2828
Serial.println("Error");
2929
}

examples/Sensors/Light-APDS9960/ProximitySensor/ProximitySensor.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
#include <Arduino_MKRIoTCarrier.h>
1515
MKRIoTCarrier carrier;
16-
bool CARRIER_CASE = false;
1716

1817
void setup() {
1918
Serial.begin(9600);
2019
while (!Serial);
2120

21+
CARRIER_CASE = false;
2222
if (!carrier.begin()) {
2323
Serial.println("Error initializing APDS9960 sensor!");
2424
}

examples/Sensors/Light-APDS9960/Read_Colors/Read_Colors.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
#include <Arduino_MKRIoTCarrier.h>
66
MKRIoTCarrier carrier;
7-
bool CARRIER_CASE = false;
87

98
void setup() {
109
Serial.begin(9600);
1110
while (!Serial);
1211

12+
CARRIER_CASE = false;
1313
carrier.begin();
1414
}
1515

examples/Sensors/Pressure-LPS22HB/ReadPressure/ReadPressure.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
#include <Arduino_MKRIoTCarrier.h>
1515
MKRIoTCarrier carrier;
16-
bool CARRIER_CASE = false;
1716

1817
void setup() {
1918
Serial.begin(9600);
2019
while (!Serial);
21-
20+
21+
CARRIER_CASE = false;
2222
if (!carrier.begin()) {
2323
Serial.println("Failed to initialize!");
2424
while (1);

examples/Sensors/Pressure-LPS22HB/ReadPressureImperial/ReadPressureImperial.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
#include <Arduino_MKRIoTCarrier.h>
1515
MKRIoTCarrier carrier;
16-
bool CARRIER_CASE = false;
1716

1817
void setup() {
1918
Serial.begin(9600);
2019
while (!Serial);
2120

21+
CARRIER_CASE = false;
2222
if (!carrier.begin()) {
2323
Serial.println("Failed to initialize!");
2424
while (1);
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
#include "Arduino_MKRIoTCarrier.h"
22
MKRIoTCarrier carrier;
3-
bool CARRIER_CASE = false;
43

54
// When CARRIER_CASE is false it's set to 100 (closer)
65
// When CARRIER_CASE is true it's set to 4 (further)
76
// But if you use Buttons.updateConfig(value) It will not set the above values
87

9-
unsigned int trheshold = 100;
8+
unsigned int threshold = 100;
109

1110
void setup() {
1211
// put your setup code here, to run once:
1312
Serial.begin(9600);
1413
while (!Serial);
1514

16-
//Now we can set our custom touch trheshold
17-
carrier.Buttons.updateConfig(trheshold);
15+
//CARRIER_CASE = false;
16+
//Now we can set our custom touch threshold
17+
carrier.Buttons.updateConfig(threshold);
1818
carrier.begin();
1919
}
2020

2121
void loop() {
2222
// put your main code here, to run repeatedly:
2323
carrier.Buttons.update();
2424
//Lets test 1 button, they should all react in the same way
25-
if (carrier.Button1.getTouch()) {
25+
if (carrier.Button0.getTouch()) {
2626
Serial.println("touching");
2727
}
2828
}

examples/TouchPads/Relays_control_Qtouch/Relays_control_Qtouch.ino

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*/
44
#include <Arduino_MKRIoTCarrier.h>
55
MKRIoTCarrier carrier;
6-
bool CARRIER_CASE = false;
76

87
//False means Normally closed
98
bool newRelay1 = false;
@@ -16,6 +15,8 @@ uint32_t c_green = carrier.leds.Color(40, 0, 0);
1615
void setup() {
1716
// put your setup code here, to run once:
1817
Serial.begin(9600);
18+
19+
CARRIER_CASE = false;
1920
carrier.begin();
2021

2122
carrier.leds.setPixelColor(0, c_green);
@@ -42,7 +43,7 @@ void loop() {
4243
//The LED changes to Green its going to be NC (Normally Closed) or Orange to NO (Normally Open)
4344
//Then the middle pad its going to upload the relay status, to confirm both new status
4445

45-
if (carrier.Button1.onTouchDown()) {
46+
if (carrier.Button0.onTouchDown()) {
4647
newRelay2 = !newRelay2;
4748
if (newRelay2) {
4849
carrier.leds.setPixelColor(0, c_orange);
@@ -52,7 +53,7 @@ void loop() {
5253
carrier.leds.show();
5354

5455
}
55-
if (carrier.Button5.onTouchDown()) {
56+
if (carrier.Button4.onTouchDown()) {
5657
newRelay1 = !newRelay1;
5758
if (newRelay1) {
5859
carrier.leds.setPixelColor(4, c_orange);
@@ -62,7 +63,7 @@ void loop() {
6263
carrier.leds.show();
6364
}
6465

65-
if (carrier.Button3.onTouchDown()) {
66+
if (carrier.Button2.onTouchDown()) {
6667
carrier.leds.setPixelColor(2, c_orange);
6768
carrier.leds.show();
6869

@@ -90,4 +91,4 @@ void loop() {
9091

9192
delay(20);
9293

93-
}
94+
}

examples/TouchPads/TouchTypes/TouchTypes.ino

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
*/
1313
#include <Arduino_MKRIoTCarrier.h>
1414
MKRIoTCarrier carrier;
15-
bool CARRIER_CASE = false;
1615

1716

1817
void setup() {
1918
Serial.begin(9600);
2019
while (!Serial);
2120
// Qtouch initialization
21+
CARRIER_CASE = false;
2222
if (!carrier.begin()) {
2323
Serial.println("Error in sensors initialization!");
2424
while (1);
@@ -30,19 +30,19 @@ void loop() {
3030
// polling the sensor for new measure
3131
carrier.Buttons.update();
3232

33-
if (carrier.Button1.onTouchDown()) {
33+
if (carrier.Button0.onTouchDown()) {
3434
Serial.println("Touched Down Button 1");
3535
}
36-
if (carrier.Button2.onTouchUp()) {
36+
if (carrier.Button1.onTouchUp()) {
3737
Serial.println("Release Touch Button 2");
3838
}
39-
if (carrier.Button3.onTouchChange()) {
39+
if (carrier.Button2.onTouchChange()) {
4040
Serial.println("Changed Touch Button 3");
4141
}
42-
if (carrier.Button4.getTouch()) {
42+
if (carrier.Button3.getTouch()) {
4343
Serial.println("Touching Button 4");
4444
}
45-
if (carrier.Button5.getTouch()) {
45+
if (carrier.Button4.getTouch()) {
4646
Serial.println("Touching Button 5");
4747
}
4848
delay(20);

0 commit comments

Comments
 (0)