-
Notifications
You must be signed in to change notification settings - Fork 420
Description
Issue is related to Arduino Nano Sense BLE and DS18B20 sensor (waterproof version) are not working together.
What I tried so far. I performed a test on UNO to isolate possible powering and sensor fault. Test looked as follows:
Connection of DS18B20
Black > GDN
Red > 3V
Yellow > D2
Last two connected via 2k2 resistor (2k2 instead 4k7 as I use 3V).
Then, to exclude possible coding mistakes I used ready example:
// Include the libraries we need
#include <OneWire.h>
#include <DallasTemperature.h>
// Data wire is plugged into port 2 on the Arduino
#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.
DallasTemperature sensors(&oneWire);
void setup(void)
{
// start serial port
Serial.begin(9600);
Serial.println("Dallas Temperature IC Control Library Demo");
// Start up the library
sensors.begin();
}
void loop(void)
{
// call sensors.requestTemperatures() to issue a global temperature
// request to all devices on the bus
Serial.print("Requesting temperatures...");
sensors.requestTemperatures(); // Send the command to get temperatures
Serial.println("DONE");
// After we got the temperatures, we can print them here.
// We use the function ByIndex, and as an example get the temperature from the first sensor only.
Serial.print("Temperature for the device 1 (index 0) is: ");
Serial.println(sensors.getTempCByIndex(0));
delay(1000);
}
Result? works perfectly fine.
Then I switched to Nano Sense BLE board. without disconnecting the sensor I just switched connection on board's end and attached GDN, 3.3V and D2.
Result, -127. When trying to find DS18B20 address the result is none.
I noticed there is few topics around internet regarding nano series and none are resolved. I found also IoT and Every has the same problem.