LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino and Dallas DS1820 (one-wire)

Solved!
Go to solution

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

0 Kudos
Message 141 of 172
(2,096 Views)

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?

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 142 of 172
(2,096 Views)

Hi Matt,

can you post your working vi?

Regards

0 Kudos
Message 143 of 172
(2,096 Views)

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!

0 Kudos
Message 144 of 172
(2,096 Views)

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.

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 145 of 172
(2,096 Views)

Spoke too soon.  Just found the "real" code.  Here it is.

-Matt

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 146 of 172
(2,096 Views)

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

0 Kudos
Message 147 of 172
(2,096 Views)

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.

0 Kudos
Message 148 of 172
(2,096 Views)

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.

0 Kudos
Message 149 of 172
(2,096 Views)

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.

0 Kudos
Message 150 of 172
(2,096 Views)