@@ -43,14 +43,14 @@ Intialization example sketch
43
43
#include < Arduino_MKRIoTCarrier.h>
44
44
MKRIoTCarrier carrier;
45
45
46
- // Needs to be declared in order to setup correctly the touch pads
47
- bool CARRIER_CASE = false ;
48
-
49
46
setup (){
50
- if(!carrier.begin(){ //It will see any sensor failure
51
- Serial.println("Failure on init");
52
- while(1);
53
- }
47
+ Serial.begin(9600);
48
+ //This will adjust the sensitivity of the touch pads, not mandatory to set it, by default is false
49
+ CARRIER_CASE = false;
50
+ if(!carrier.begin(){ //It will see any sensor failure
51
+ Serial.println("Failure on init");
52
+ while(1);
53
+ }
54
54
}
55
55
```
56
56
@@ -67,11 +67,11 @@ The chip select (CS) pin can be known with SD_CS
67
67
``` cpp
68
68
#include < Arduino_MKRIoTCarrier.h>
69
69
MKRIoTCarrier carrier;
70
- bool CARRIER_CASE = false ;
71
70
72
71
File myFile;
73
72
74
73
setup (){
74
+ CARRIER_CASE = false;
75
75
carrier.begin(); //SD card initialized here
76
76
77
77
myFile = SD.open("test.txt", FILE_WRITE);
@@ -80,8 +80,6 @@ setup(){
80
80
81
81
### Buttons class
82
82
83
- Mandatory to create the bool ` bool CARRIER_CASE = true/false `
84
-
85
83
Init the calaibration and the set up for the touchable pads (Already done in the MKRIoTCarrier class' begin())
86
84
``` cpp
87
85
Buttons.begin()
@@ -93,6 +91,8 @@ Buttons.update()
93
91
94
92
### ButtonX class
95
93
94
+ Button0 - Button4
95
+
96
96
Get if the pad is getting touched, true until it gets released
97
97
``` cpp
98
98
ButtonX.getTouch()
@@ -114,7 +114,8 @@ ButtonX.onTouchChange()
114
114
```
115
115
116
116
In case you have another enclosure you can change the sensivity of the pads, 3-100
117
- Automatically configured in the main class begin() when you declare the ` CARRIER_CASE ` boolean
117
+ Automatically configured when you set the ` CARRIER_CASE ` boolean, by default is false (sensitivity threshold 4)
118
+
118
119
``` cpp
119
120
ButtonX.updateConfig(int newSens)
120
121
```
@@ -123,10 +124,10 @@ ButtonX.updateConfig(int newSens)
123
124
``` cpp
124
125
#include < Arduino_MKRIoTCarrier.h>
125
126
MKRIoTCarrier carrier;
126
- bool CARRIER_CASE = true /false ;
127
127
128
128
void setup (){
129
129
Serial.begin(9600);
130
+ CARRIER_CASE = true/false;
130
131
carrier.begin();
131
132
}
132
133
@@ -162,11 +163,11 @@ Control both relays and get the status of them
162
163
163
164
You can control them by using ` Relay1 ` and ` Relay2 `
164
165
165
- Swap to the NormallyOpen (NO) circuit from the relay
166
+ Swap to the NormallyOpen (NO) circuit of the relay
166
167
``` cpp
167
168
RelayX.open()
168
169
```
169
- Swap to the NormallyClosed (NC) circuit from the relay, default mode on power off
170
+ Swap to the NormallyClosed (NC) circuit of the relay, default mode on power off
170
171
``` cpp
171
172
RelayX.close()
172
173
```
@@ -186,11 +187,11 @@ The documentation form Adafruit [here](https://learn.adafruit.com/adafruit-dotst
186
187
``` cpp
187
188
#include < Arduino_MKRIoTCarrier.h>
188
189
MKRIoTCarrier carrier;
189
- bool CARRIER_CASE = false ;
190
190
191
191
uint32_t myCustomColor = carrier.leds.Color(255 ,100 ,50 );
192
192
193
193
void setup (){
194
+ CARRIER_CASE = false;
194
195
carrier.begin();
195
196
carrier.leds.fill(myCustomColor, 0, 5);
196
197
carrier.leds.show();
0 commit comments