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

Because the pin is determined when you create the OneWire object, you will need to add another one of those and then either duplicate the functions that were made for LIFA and LabVIEW or make it so that you have to send a sensor number reference so you know which one to retrieve.

0 Kudos
Message 71 of 172
(2,183 Views)

Can someone point me in the direction of tested and working code for Arduino and LV? Im using the UNO R3and have a DS1820. I have tried some examples from this discussion with no success.  Thank you

0 Kudos
Message 72 of 172
(2,183 Views)

Hi Nathan.

Had a go at what you suggested re reading multiple DS18B20's. But not having too much success.

I added the device addresses under the variables section in LabVIEWInterface.ino. I then duplicated the

device reads in the OneWire Read section.

I edited the DS1820 subvi for the extra temperature values..

Files attached.

Would appreciate your taking a look...

d

0 Kudos
Message 73 of 172
(2,183 Views)

Were you able to get it to work with just one?  The only think that I see wrong is that you are still only reading 4 bytes in DS1820 Get Temp.vi when  you need to be getting 12.

0 Kudos
Message 74 of 172
(2,183 Views)

Yep... I have just re-edited things and gone back to a single DS18B20. That's working.

I thought I was getting 4 bytes as I'm using your vi.

d

0 Kudos
Message 75 of 172
(2,183 Views)

When you added the other two sensors you increase the amount of data sent.  If Arduino sends more data then you need to read more data.

0 Kudos
Message 76 of 172
(2,183 Views)

Here is what I'm using Nathan.

DS1820 Get Temp.jpg

0 Kudos
Message 77 of 172
(2,183 Views)

That is the same as the VI that you posted earlier.  The only thing that I see wrong is that you are still only reading 4 bytes when you need to be getting 12.  After you make that change, it should work because I believe the firmware code looks correct.

0 Kudos
Message 78 of 172
(2,183 Views)

Sorry Nathan - Not too sure whats required then - I thought extending the array would do that...

d

0 Kudos
Message 79 of 172
(2,183 Views)

You have to change the 4 that is wired to the Send/Receive VI to 12 (it's wired to the "Bytes to Read" terminal).

0 Kudos
Message 80 of 172
(2,183 Views)