Getting Started with MKR Sensor Shield
Arduino MKR is the latest form factor of Arduino series specially designed for IoT projects. There are plenty of connectivity options served in the series such as Wi-Fi, BLE, LoRa, NB-IoT, SigFox and more.
Turta MKR Sensor Shield is a multi-sensor carrier for the Arduino MKR series. Combining with the connectivity options of the Arduino MKR series, this shield can connect sensor readings to the cloud in any way of your choice.
MKR Sensor Shield senses the following:
- Relative humidity
- Ambient light
- RGB light
- Hand gestures
- 3D Acceleration
- 3D Tilt detection
It also has a Micro SD card slot for data logging and 2 LEDs for custom indications.
How to start with it?
Beginning with MKR Sensor Shield is easy. All you need is copying its library to the libraries folder of your Arduino sketch directory. Then, you’ll see example codes for each function in the Arduino IDE’s examples menu. Our documentation explains the library installation step by step at docs.turta.io/arduino-shields/mkr-sensor-shield address.
You can access each reading with simple functions like "ReadTemperature()" or "ReadAmbientLight()."
Temperature & Humidity Reading Example
To begin with, we'll read temperature & RH data from the shield. Here is the step by step guide for a jumpstart.
- Make sure you've installed MKR Sensor Shield library.
- Start the Arduino IDE, and from the Tools > Boards menu, select any Arduino MKR series board. We'll use Arduino MKR WiFi 1010.
- From File > Examples > Turta MKR Sensor Shield > Temp_RH_Sensor, open Temperature_Humidity example.
- Connect Arduino to your computer. Select the Arduino device from Tools > Port menu.
- Upload the sketch to the Arduino using the Upload button.
- When you uploaded the sketch, open the Serial Monitor from the Tools menu or its icon.
Then, you'll see temperature and humidity readings on the Serial Monitor. The printed data should be like this:
This application will continue to read environmental data continuously each second.