I got it to compile by changing the include for the onewire.h so that it is now:
#include "OneWire/OneWire.h"
Using this onewire example I am getting an output from the sensor but it is wrong.
ROM = 28 9C 4E DE 6 0 0 5C
Chip = DS18B20
Data = 1 1 4B 46 7F FF 1 10 14 FF CRC=A7
Temperature = 1200.06 Celsius, 2192.11 Fahrenheit
No more addresses.
So I was reading through this thread and it looks like I should be using the spark-dallas-temperature library but there is no example ds18b20.ino file like exposure has in post #5.
I did figure out how to get the right temp using the spark-Dallas-temperature library. I had to write my own application since there wasnāt an example.
The other issue I had was that I was trying to work on it way to late with my wife continuing to remind me that it was bed time.
Turns out I put the wrong port in for the data pin (on the Dallas example I had to create).
I have been working on getting the examples working in the core+photon port of OneWire and DallasTemperature. The port works but the examples are taking a little longer. So far I have āMultipleā and āAlarmā compiling. Note if you want to try and fork these examples you have to add the Particle-OneWire library through the webIDE. That is import both libraries, then fork either āAlarm.inoā or āMultiple.inoā then include Particle-OneWire library. I will try and get the others up and running soon.
To import a library from GitHub:
Go to the library tab in the WebIDE
click"Contribute Library"
paste the link above
click import (ignore the warning that another user already has a library by this name)
5)Whala
Has anyone tried to get the max31850 chips working? I have it working on an Arduino but would like to use my photon. If nobody has worked on this, Iāll give it a try but it will take a while as Iām a little time constrained ATM.
Thanks to everyone for sharing these great resources. I was able to build two wireless thermometers with what youāve shared. After much testing, I installed one of the thermometers. Iāve mounted the Core in a project box and mounted it to the wall, then routed the DS18b20 into our chest freezer. The Core dutifully reported the temperature down to -14C. The next report showed -127 and thatās all it has shown since. The Core reported reliable temperature readings for over a week in the house. Any ideas as to why itās doing this in the deep freeze?
I havenāt test this after the rename to Particle, but this is my source code for sous vide with Core (am using ds18b20). You can try to drop in the libraries as is, and see if it works.
@Soemarko, your source code works great! I edited out everything I didnāt need for my purpose. The core I have monitoring my deep freezer now reports the actual temperature rather than -127.
I had done quite a bit of searching last night and ran across a thread on the arduino forums by someone that was experiencing the same issues. It does appear it has something to do with the DallasTemperature library. Using yours, everything is working great. Thank you!!
Nearly one year later - and it seems that little progress has been made along the lines of putting together a simple working example for getting multiple DS18B20s to work with the Photon.
Iāve been trying a lot of the examples from this thread, but nothing is working. Given that all of these examples are years old, can anyone share working code (bonus points for step-by-step and/or the actual concepts behind getting this to work) utilizing the latest libraries available via Particle Build? I am working on OSX, and am pretty lost overall.
Thanks @gusgonnet! This is definitely pointing me in the right direction, as I am planning to use multiple sensors and a relay as well. Itās not compiling for me, but will see what I can do.
Iām back with a new problem! Code seems to be working, but I am only getting a read value of -1 in the Particle console.
The code is currently set up for 2 sensors, 1 of which Iām just not using until I get the other one working. The unused pin continuously reads 32F/0C.
The serial monitor is consistently displaying a 0 (unused pin, Iām assuming), and a āCRC Failedā message, which should be the -1 value in the Particle console.
Here is a pic of my current wiring in case that might be the problem. Thanks all!