You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/01.mkr/03.carriers/mkr-iot-carrier-rev2/tutorials/mkr-iot-carrier-01-technical-reference/cheat-sheet.md
+58-60Lines changed: 58 additions & 60 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: 'MKR IoT Carrier Cheat Sheet'
3
-
description: 'Learn how to set up the MKR IoT Carrier, get a quick overview of the compatible boards, components, and the library.'
4
-
author: 'Liam Aljundi'
2
+
title: 'MKR IoT Carrier Rev2 Cheat Sheet'
3
+
description: 'Learn how to set up the MKR IoT Carrier Rev2, get a quick overview of the compatible boards, components, and the library.'
The Arduino® MKR IoT Carrier is equipped with different sensors, actuators and with a display to leave you free to focus on prototyping and programming your next IoT projects. The carrier does not come equipped with a microcontroller, meaning it only works in combination with an Arduino board. The MKR IoT Carrier comes equipped with 5 RGB LEDs, 5 capacitive touch buttons, a colored display, IMU and a variety of quality sensors. It also features a battery holder for a 18650 Li-Ion battery, SD card holder and Grove connectors.
18
+
The Arduino® MKR IoT Carrier Rev2 is equipped with different sensors, actuators and with a display to leave you free to focus on prototyping and programming your next IoT projects. The carrier does not come equipped with a microcontroller, meaning it only works in combination with an Arduino board. The MKR IoT Carrier Rev2 comes equipped with 5 RGB LEDs, 5 capacitive touch buttons, a colored display, IMU and a variety of quality sensors. It also features a battery holder for a 18650 Li-Ion battery, SD card holder and Grove connectors.
19
19
20
20
## Compatible Boards
21
21
22
-
The MKR family of boards share a common pinout, meaning that they can all be easily connected to the MKR IoT Carrier. Here is a list of the MKR boards:
22
+
The MKR family of boards share a common pinout, meaning that they can all be easily connected to the MKR IoT Carrier Rev2. Here is a list of the MKR boards:
-[MKR FOX 1200](https://docs.arduino.cc/hardware/mkr-fox-1200)
@@ -35,19 +35,19 @@ The MKR family boards offer different features that can be useful for your proje
35
35
36
36
### Assembly
37
37
38
-
The chosen Arduino MKR board needs to be mounted on top of the MKR IoT Carrier and connected to a computer. The board can be connected as shown in the image below, matching the pin numbers on the board to the ones on the carrier.
38
+
The chosen Arduino MKR board needs to be mounted on top of the MKR IoT Carrier Rev2 and connected to a computer. The board can be connected as shown in the image below, matching the pin numbers on the board to the ones on the carrier.
39
39
40
-

40
+

41
41
42
42
## Datasheet
43
43
44
44
The full datasheet is available as a downloadable PDF from the link below:
45
45
46
-
-[Download the Arduino MKR IoT Carrier datasheet](https://content.arduino.cc/assets/MKR%20IoT%20Carrier%20-%20Datasheet.pdf?_gl=1*13zil78*_ga*MTgzMTI1MTI1Mi4xNjE3ODc1MzM2*_ga_NEXN8H46L5*MTYzMDQwMTY0OS4xMzAuMS4xNjMwNDA2MTcwLjA.)
46
+
-[Download the Arduino MKR IoT Carrier Rev2 datasheet](https://content.arduino.cc/assets/MKR%20IoT%20Carrier%20-%20Datasheet.pdf?_gl=1*13zil78*_ga*MTgzMTI1MTI1Mi4xNjE3ODc1MzM2*_ga_NEXN8H46L5*MTYzMDQwMTY0OS4xMzAuMS4xNjMwNDA2MTcwLjA.)
47
47
48
48
## Arduino IoT Cloud
49
49
50
-
The MKR IoT Carrier can be controlled through the [Arduino IoT Cloud](https://create.arduino.cc/iot/things), a cloud service that allows us to create IoT applications in just minutes, if combined with an Arduino IoT Cloud compatible board. Here's a list of the Arduino MKR family boards that are compatible with the Arduino IoT Cloud:
50
+
The MKR IoT Carrier Rev2 can be controlled through the [Arduino IoT Cloud](https://create.arduino.cc/iot/things), a cloud service that allows us to create IoT applications in just minutes, if combined with an Arduino IoT Cloud compatible board. Here's a list of the Arduino MKR family boards that are compatible with the Arduino IoT Cloud:
@@ -62,25 +62,23 @@ If you need help to get started, you can go through the [Arduino IoT Cloud tutor
62
62
63
63
## Pinout
64
64
65
-

65
+

66
66
67
-
To see the full pinout, you can download the PDF from the link below.
68
-
69
-
-[The MKR IoT Carrier full pinout (PDF)](https://content.arduino.cc/assets/Pinout-MKRIOTCARRIER_latest.pdf)
67
+
The full pinout is available in the [resources section](/hardware/mkr-iot-carrie-rev2#resources).
70
68
71
69
## Grove Connectors
72
70
73
-

71
+

74
72
75
-
The MKR IoT Carrier comes with **three grove connectors** (2 analog and 1 I2C) that enables us to easily connect external sensors. The type of the connector is labeled clearly on the back of the carrier.
73
+
The MKR IoT Carrier Rev2 comes with **three grove connectors** (2 analog and 1 I2C) that enables us to easily connect external sensors. The type of the connector is labeled clearly on the back of the carrier.
76
74
77
75
## Carrier Library
78
76
79
-
To program the MKR IoT Carrier, the **[Arduino_MKRIoTCarrier](https://www.arduino.cc/reference/en/libraries/arduino_mkriotcarrier/)** library needs to be included. This library allows us to control and read all the components of the MKR IoT Carrier. Setting up the MKRIoTCarrier library requires an addition of few code lines in the **initialization** and **setup**. Practically speaking, the code used in the initialization and setup is rarely changed, and it is required in every sketch.
77
+
To program the MKR IoT Carrier Rev2, the **[Arduino_MKRIoTCarrier](https://www.arduino.cc/reference/en/libraries/arduino_mkriotcarrier/)** library needs to be included. This library allows us to control and read all the components of the MKR IoT Carrier Rev2. Setting up the **Arduino_MKRIoTCarrier** library requires an addition of few code lines in the **initialization** and **setup**. Practically speaking, the code used in the initialization and setup is rarely changed, and it is required in every sketch.
80
78
81
79
### Initialization
82
80
83
-
In the initialization (the very top) of every sketch, the **MKRIoTCarrier** library needs to be included, which includes the individual libraries of the components mounted onto the carrier.
81
+
In the initialization (the very top) of every sketch, the **Arduino_MKRIoTCarrier** library needs to be included, which includes the individual libraries of the components mounted onto the carrier.
84
82
85
83
Next, an object of type `MKRIoTCarrier` needs to be created. We'll call it `carrier` for simplicity.
86
84
@@ -116,46 +114,46 @@ void setup() {
116
114
}
117
115
```
118
116
119
-
## Humidity & Temperature Sensor
117
+
## BME680 Environmental Sensor
118
+
119
+

120
120
121
-

121
+
The **[BME680 Environmental Sensor](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme688-ds000.pdf)** is a 4 in 1 sensor capable of providing the following measurements:
122
+
-**Humidity**, 0‒100% r.H.
123
+
-**Temperature**, -40 to +85 °C.
124
+
-**Pressure**, 300-1100 hPa.
125
+
-**Gas**, IAQ, VOC, CO2.
122
126
123
-
The **HTS221 Humidity Sensor**is mounted on the top side of the carrier under the display, marked with a drop icon. The sensor uses capacitive sensing with a **humidity sensing range** of**0-100%** and **accuracy** of **± 3.5% rH (20 to +80% rH)**, and a **temperature sensing range** of **-40 to 120° C**, with an **accuracy** of **± 0.5 °C,15 to +40 °C**. The sensor uses a low power consumption (2μA at 1 Hz sampling rate) and connects to the mounted Arduino MKR board through a I2C interface.
127
+
BME680 is a low-power sensor with current consumption as low as**2.1 µA at 1 Hz**. It communicates over the I²C bus as other sensors onboard this carrier.
124
128
125
129
### Code
126
130
127
-
The values from the **temperature** and **humidity** sensors can be retrieved and stored in **float** variables as shown below.
131
+
The values from the **temperature, humidity & pressure**can be retrieved and stored in **float** variables as shown below. For this, we need to use the `Env` class.
128
132
129
133
```arduino
130
134
float temperature = carrier.Env.readTemperature();
135
+
float temperature = carrier.Env.readTemperature(FAHRENHEIT);
131
136
float humidity = carrier.Env.readHumidity();
137
+
float pressure = carrier.Env.readPressure(); //returns value in kPa
132
138
```
133
139
134
-
Temperature is returned in degrees Celsius, while relative humidity is returned in percentage.
135
-
136
-
The underlying library used to read the sensor is **[Arduino_HTS221](https://www.arduino.cc/reference/en/libraries/arduino_hts221/)**.
137
-
138
-
## Pressure Sensor
139
-
140
-

140
+
***Temperature is returned in degrees Celsius, while relative humidity is returned in percentage.***
141
141
142
-
The **LPS22HBTR Pressure Sensor** is mounted on the top side of the carrier under the display, marked with a meter icon. The sensor measures **absolute pressure range** of **260 to 1260 hPa (0.25 to 1.24 atm)** and connects to the mounted Arduino MKR board through a I2C interface.
143
-
144
-
### Code
145
-
146
-
The value from the **pressure** sensor, expressed in kiloPascal (kPa) can be retrieved and stored in a **float** variable as shown below.
142
+
To access **gas** various values, we need to use the `AirQuality` class.
The underlying library used to read the sensor is **[Arduino_LPS22HB](https://www.arduino.cc/reference/en/libraries/arduino_lps22hb/)**.
153
-
154
150
## IMU Accelerometer & Gyroscope Sensors
155
151
156
-

152
+

153
+
154
+
### LSM6DSOXTR
157
155
158
-
The carrier includes a **LSM6DS3** sensor from STM which is an IMU (Inertial Measurement Unit) featuring a 3D digital accelerometer and a 3D digital gyroscope.
156
+
The [LSM6DSOX](https://www.st.com/resource/en/datasheet/lsm6dsox.pdf)from STM is an IMU (Inertial Measurement Unit) that features a 3D digital **accelerometer** and a 3D digital **gyroscope**.
159
157
160
158
### Code
161
159
@@ -188,13 +186,13 @@ carrier.IMUmodule.readAcceleration(x, y, z);
188
186
189
187
Reads acceleration data from the sensor on the three axis and assigns it to the provided variables.
190
188
191
-
The underlying library used to read the sensor is **[Arduino_LSM6DS3](https://www.arduino.cc/reference/en/libraries/arduino_lsm6ds3/)**.
189
+
The underlying library used to read the sensor is **[LSM6DSOX](https://github.com/arduino-libraries/Arduino_LSM6DSOX)**.
192
190
193
191
## RGB and Gesture Sensor
194
192
195
-

193
+

196
194
197
-
The MKR IoT Carrier contains a Broadcom **APDS-9660 RGB and Gesture sensors**, situated under the display and marked with a bulb icon. The sensor is useful for **ambient light** and **RGB** color sensing, **proximity** sensing, and **gesture** detection.
195
+
The MKR IoT Carrier Rev2 contains a Broadcom **APDS-9660 RGB and Gesture sensors**, situated under the display and marked with a bulb icon. The sensor is useful for **ambient light** and **RGB** color sensing, **proximity** sensing, and **gesture** detection.
198
196
199
197
### Code
200
198
@@ -259,9 +257,9 @@ The underlying library used to read the sensor is **[Arduino_APDS9960](https://w
259
257
260
258
## Relays
261
259
262
-

260
+

263
261
264
-
The MKR IoT Carrier is equipped with two 5V Coil voltage **KEMET EE2-5NU-L relays**, located on the back side of the carrier. The relays are non-latching with a **COM** (common), **NO** (Normally open) and **NC** (normally closed) contacts, and can take up a max of **2A** Current and **24 V** of input each.
262
+
The MKR IoT Carrier Rev2 is equipped with two 5V Coil voltage **KEMET EE2-5NU-L relays**, located on the back side of the carrier. The relays are non-latching with a **COM** (common), **NO** (Normally open) and **NC** (normally closed) contacts, and can take up a max of **2A** Current and **24 V** of input each.
265
263
266
264
The connections between a high power circuit and the relays will be done through these connectors.
The screen on the MKR IoT Carrier is a **rounded 1.3” TFT display**, with a 240 x 240 resolution and a diameter of 36 x 40 mm.
303
+
The screen on the MKR IoT Carrier Rev2 is a **rounded 1.3” TFT display**, with a 240 x 240 resolution and a diameter of 36 x 40 mm.
306
304
307
305
#### Code
308
306
309
-
The display is controlled through the `carrier.display` object which is an instance of the **Adafruit_ST7789** class, based on the more general **Adafruit_GFX** interface. Most tutorials mentioning **Adafruit_GFX** should be usable on your MKR IoT Carrier.
307
+
The display is controlled through the `carrier.display` object which is an instance of the **Adafruit_ST7789** class, based on the more general **Adafruit_GFX** interface. Most tutorials mentioning **Adafruit_GFX** should be usable on your MKR IoT Carrier Rev2.
310
308
311
309
To get started, check the [Adafruit_GFX documentation](https://learn.adafruit.com/adafruit-gfx-graphics-library) and see the examples included in the Arduino_MKTIoTCarrier library.
312
310
313
311
314
312
315
313
](https://www.arduino.cc/reference/en/libraries/adafruit-st7735-and-st7789-library/), which is included in the carrier's library, meaning that it does not need to be added it separately.
316
314
317
-
We'll list here some of the most useful methods to configure the MKR IoT Carrier's display, including basic configurations, background and text colors, font size, position of the cursor and a loading animation.
315
+
We'll list here some of the most useful methods to configure the MKR IoT Carrier Rev2's display, including basic configurations, background and text colors, font size, position of the cursor and a loading animation.
318
316
319
317
```arduino
320
318
carrier.display.fillScreen(color);
@@ -370,11 +368,11 @@ This method will print the text inside the string at the current cursor position
370
368
371
369
#### More Resources
372
370
373
-
In order to develop a graphical user interface with the MKR IoT Carrier, the **[Arduino_OplaUI](https://www.arduino.cc/reference/en/libraries/arduino_oplaui/)** library can be used. This library uses the color LEDs, the buzzer and the touch buttons to build an interactive user interface featuring multiple pages. It also includes a few predefined gauges to display values. See the library examples to get started.
371
+
In order to develop a graphical user interface with the MKR IoT Carrier Rev2, the **[Arduino_OplaUI](https://www.arduino.cc/reference/en/libraries/arduino_oplaui/)** library can be used. This library uses the color LEDs, the buzzer and the touch buttons to build an interactive user interface featuring multiple pages. It also includes a few predefined gauges to display values. See the library examples to get started.
The carrier has five **capacitive touch buttons** on its top side, numbered from 0 to 4. The buttons are sensitive to direct touch and can also detect wireless touch.
380
378
@@ -429,17 +427,17 @@ Replace `TOUCH0` with `TOUCH1`, `TOUCH2`, `TOUCH3`, `TOUCH4` in the examples abo
429
427
430
428
### LEDs
431
429
432
-

430
+

433
431
434
-
The MKR IoT Carrier comes with 5 **digital RGB LEDs** placed on the top side of the carrier in front of the buttons.
432
+
The MKR IoT Carrier Rev2 comes with 5 **digital RGB LEDs** placed on the top side of the carrier in front of the buttons.
435
433
436
434
#### Code
437
435
438
436
The LEDs are controlled with the Adafruit’s DotStar library, which is included in the `MKRIoTCarrier` library.
439
437
440
438
The `carrier.leds.show();` method is necessary for updating the new state of the LEDs and needs to be called after any change of the state of the LEDs (turning on & off or change of color).
441
439
442
-
Here are some of the useful methods used to control the LEDs on the MKR IoT Carrier:
440
+
Here are some of the useful methods used to control the LEDs on the MKR IoT Carrier Rev2:

492
+

495
493
496
-
The MKR IoT Carrier is equipped with a **sound buzzer** on the bottom side of the carrier, under the MKR board.
494
+
The MKR IoT Carrier Rev2 is equipped with a **sound buzzer** on the bottom side of the carrier, under the MKR board.
497
495
498
496
#### Code
499
497
@@ -520,7 +518,7 @@ This method is a handy shortcut generating a beep. The two arguments are optiona
520
518
521
519
## Memory
522
520
523
-
The MKR IoT Carrier contains a **SD card slot** that accepts a Micro SD.
521
+
The MKR IoT Carrier Rev2 contains a **SD card slot** that accepts a Micro SD.
524
522
525
523
### Code
526
524
@@ -546,11 +544,11 @@ In order to learn more, check any of the many tutorials about using the `SD` lib
546
544
547
545
## Power
548
546
549
-

547
+

550
548
551
-
The MKR IoT Carrier can be either powered through a USB cable connected to the mounted MKR board, or through a battery. The battery used should be a LI-ION 18650 3.7v battery, which can be mounted to the carrier via the battery holder on the bottom side.
549
+
The MKR IoT Carrier Rev2 can be either powered through a USB cable connected to the mounted MKR board, or through a battery. The battery used should be a LI-ION 18650 3.7v battery, which can be mounted to the carrier via the battery holder on the bottom side.
552
550
553
-
In order to use the USB power to charge the battery, a little cable with JST connectors on both ends is needed between the MKR IoT Carrier and the MKR board. The bBattery can then be recharged via a USB connection through the MKR Board (runs up to 48h with a 3.7v 2500mAh).
551
+
In order to use the USB power to charge the battery, a little cable with JST connectors on both ends is needed between the MKR IoT Carrier Rev2 and the MKR board. The bBattery can then be recharged via a USB connection through the MKR Board (runs up to 48h with a 3.7v 2500mAh).
0 commit comments