Hi everyone. Hope you're all safe.
KIT
Yesterday the kit finally arrived (thank you Element14) and it's awesome.
Start testing
Today, was time to test some of the components. This was my first experience with an Arduino MKR 1300 WAN. I haven't yet tried the IoT Cloud or LoRa, but that time will come.
So, I've decided to test Adafruit's High Temperature Probe DS18B20.
According to Adafruit's learning tutorials, for this probe, the colors are has follows (The tutorial is for CircuitPython, but the wiring colors are the same):
Probe Wiring | Arduino |
Solid White | GND |
White with Orange Stripe | VCC or 5V |
White with Blue Stripe | SIGNAL |
For the Arduino MKR 1300 WAN, VCC outputs 3.3V through the on-board voltage regulator. This voltage is 3.3V if USB or VIN is used and equal to the series of the two batteries when they are used. The 5V pin outputs 5V from the the board when powered from the USB connector or from the VIN pin of the board. It is unregulated and the voltage is taken directly from the inputs.
Code
The code was taken directly from Arduino website.
#include <OneWire.h> #include <DallasTemperature.h> #define ONE_WIRE_BUS 3 OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); float Celcius=0; float Fahrenheit=0; void setup(void) { Serial.begin(9600); sensors.begin(); } void loop(void) { sensors.requestTemperatures(); Celcius=sensors.getTempCByIndex(0); Fahrenheit=sensors.toFahrenheit(Celcius); Serial.print(" C "); Serial.print(Celcius); Serial.print(" F "); Serial.println(Fahrenheit); delay(1000); }
After powering the Arduino, here's the result
Next Friday will try Lora communication with both Arduinos, transmitting some temperature values.
Merry Christmas