VMA324
V. 01 – 13/03/2018
4
©Velleman nv
Now you have loaded the sketch below, open the serial monitor and you should have a similar result as this
one:
If you look under the OneWire examples, you will find examples, which do not require the Dallas libraries.
******Code Begin******
#include <OneWire.h>
#include <DallasTemperature.h>
// Data wire is plugged into pin 2 on the Arduino , You are free to take another one
#define ONE_WIRE_BUS 2
// Setup a oneWire instance to communicate with any OneWire devices
// (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.