06-24-2014 02:01 PM
Hi all,
Thank you for all the answers and suggestions for using DS18B20s. Since this thread has lasted so long, I am asking for some help finding the right solution to use. I have read through all the posts, and tried several promising files, including those from posts 61,104,124, and 131 without success.
Does anyone have a VI and corresponding .ino working for multiple sensors, they would be willing to share?
I am using LV2013 with LIFA and UNO board. I have also tried using LINX rather than LIFA, with no luck and no solutions on their forums. (I know, this is not the right place, but if you have a solution using LINX, I'll take that too.) Ultimately, I will need to use many sensors, but for now anything that works with 2 or more is okay, then I could expand from there.
Thanks in advance for the help. I have been struggling with this for some time, and would be very grateful for an answer.
-Lena
06-24-2014 02:55 PM
Lena,
I have software I would have to dig up but it works with at least 8 sensors (the most I've hooked up). I also have a spare board with connectors for 12 sensors. Interested in either?
06-25-2014 04:58 AM
Hi Matt,
can you post your working vi?
Regards
06-25-2014 09:29 AM
Matt-
Yes, the 8 sensor software would be great. I have multiple sensors on one wire, connected to a single digital-in pin. Is this how yours is set up? Or do you have each sensor connected to a separate pin, using 8 digital-in pins for the 8 sensors?
Thanks!
07-02-2014 06:13 PM
OK, here it is (sort of). I don't have my Arduino with me, but this is an early version that I was working on. I *think* it will work for you. Let me know.
07-02-2014 06:26 PM
Spoke too soon. Just found the "real" code. Here it is.
-Matt
07-02-2014 07:35 PM
Matt, Like you, I may be speaking too soon!! But by just looking at the code, I say the compiler is going through an error message regarding the very first line, that is: OneWire ds(2); // on pin 10 (a 4.7K resistor is necessary) OnWire needs to be defined in some lib, before it can be used. Regards, Barddya
07-25-2014 02:28 PM
I tried to verify the LFIA_Base.ino from post 130 by riky973 and I get this error:
redefinition of 'OneWire oneWire'
LabVIEWInterface:24: error: redefinition of 'OneWire oneWire'
LIFA_Base:35: error: 'OneWire oneWire' previously declared here
LabVIEWInterface:27: error: redefinition of 'DallasTemperature sensors'
LIFA_Base:39: error: 'DallasTemperature sensors' previously declared here
Can someone tell me whats going on with that error? Seemingly removing these commands allowed me to verify:
//Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);
//Pass our oneWire reference to Dallis Temperature
DallasTemperature sensors(&oneWire);
But those two statements must have an importance.
07-25-2014 03:51 PM
Found that:
LabVIEWInterface:24: error: redefinition of 'OneWire oneWire'
LIFA_Base:35: error: 'OneWire oneWire' previously declared here
LabVIEWInterface:27: error: redefinition of 'DallasTemperature sensors'
LIFA_Base:39: error: 'DallasTemperature sensors' previously declared here
OneWire and DallasTemperature was duplicated in both the Labviewinterface and lifa_base. Got rid of one set and was able to verify and upload to my arduino uno. Only problem now is that the VI won't display the temperature and the VI does not seem to be communicating with the arduino.
07-26-2014 01:52 AM
Were you able to get communication working with the Arduino with the default firmware? Are you receiving any errors?
It might also be helpful if you attached your VI.