Skip to content

Commit 0263bce

Browse files
authored
Updated Reference
1 parent 2344db1 commit 0263bce

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

docs/readme.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ Intialization example sketch
4343
#include <Arduino_MKRIoTCarrier.h>
4444
MKRIoTCarrier carrier;
4545

46-
//Needs to be declared in order to setup correctly the touch pads
47-
bool CARRIER_CASE = false;
48-
4946
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+
}
5454
}
5555
```
5656

@@ -67,11 +67,11 @@ The chip select (CS) pin can be known with SD_CS
6767
```cpp
6868
#include <Arduino_MKRIoTCarrier.h>
6969
MKRIoTCarrier carrier;
70-
bool CARRIER_CASE = false;
7170

7271
File myFile;
7372

7473
setup(){
74+
CARRIER_CASE = false;
7575
carrier.begin(); //SD card initialized here
7676

7777
myFile = SD.open("test.txt", FILE_WRITE);
@@ -80,8 +80,6 @@ setup(){
8080

8181
### Buttons class
8282

83-
Mandatory to create the bool `bool CARRIER_CASE = true/false`
84-
8583
Init the calaibration and the set up for the touchable pads (Already done in the MKRIoTCarrier class' begin())
8684
```cpp
8785
Buttons.begin()
@@ -93,6 +91,8 @@ Buttons.update()
9391

9492
### ButtonX class
9593

94+
Button0 - Button4
95+
9696
Get if the pad is getting touched, true until it gets released
9797
```cpp
9898
ButtonX.getTouch()
@@ -114,7 +114,8 @@ ButtonX.onTouchChange()
114114
```
115115

116116
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+
118119
```cpp
119120
ButtonX.updateConfig(int newSens)
120121
```
@@ -123,10 +124,10 @@ ButtonX.updateConfig(int newSens)
123124
```cpp
124125
#include <Arduino_MKRIoTCarrier.h>
125126
MKRIoTCarrier carrier;
126-
bool CARRIER_CASE = true/false;
127127

128128
void setup(){
129129
Serial.begin(9600);
130+
CARRIER_CASE = true/false;
130131
carrier.begin();
131132
}
132133

@@ -162,11 +163,11 @@ Control both relays and get the status of them
162163

163164
You can control them by using `Relay1 `and `Relay2`
164165

165-
Swap to the NormallyOpen (NO) circuit from the relay
166+
Swap to the NormallyOpen (NO) circuit of the relay
166167
```cpp
167168
RelayX.open()
168169
```
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
170171
```cpp
171172
RelayX.close()
172173
```
@@ -186,11 +187,11 @@ The documentation form Adafruit [here](https://learn.adafruit.com/adafruit-dotst
186187
```cpp
187188
#include <Arduino_MKRIoTCarrier.h>
188189
MKRIoTCarrier carrier;
189-
bool CARRIER_CASE = false;
190190

191191
uint32_t myCustomColor = carrier.leds.Color(255,100,50);
192192

193193
void setup(){
194+
CARRIER_CASE = false;
194195
carrier.begin();
195196
carrier.leds.fill(myCustomColor, 0, 5);
196197
carrier.leds.show();

0 commit comments

Comments
 (0)