Please share example .ino with multiple DS18B20?

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Please share example .ino with multiple DS18B20?

Post by michap »

In 2.07 will be a 1Wire scanner (will scan for 18B20 addresses) and the array issue is fixed.
So you can replace soon the sketch with the new sample code ;)

Michael
A.Harrenberg
Posts: 201
Joined: 05 Sep 2016 22:27

Re: Please share example .ino with multiple DS18B20?

Post by A.Harrenberg »

Hi,
n0ir wrote: Thank you! The sketch you uploaded seems to work! :) I'm really thankful for your help. Maybe your sketch could be featured in the https://z-uno.z-wave.me/examples/ to help other users? I assume there must be several other users who want to use the Z-Uno with multiple temperature sensors?
no problem. The funny thing is that yesterday evening the beta 2.07 was released and from the description it will work with multi-dimensional arrays, so I expect that your code will compile and run under 2.07 as well ,-)

So you might want to give it try...

If the new compiler supports the arrays, "your" code style will be much better as an example.

For the Vera stuff I can answer, I don't have one and I don't know how it organizes the devices. I can only say that from my system (fhem) I get a "root"-device e.g. 52 and then "children" 52.01, 52.02, ... where the functions of the first child 52.01 are also mirrored into the root device.

Regards,
Andreas.
fhem.de - ZWave development support
n0ir
Posts: 21
Joined: 17 Nov 2016 16:17

Re: Please share example .ino with multiple DS18B20?

Post by n0ir »

Does this new FW means that you won't have to specify the DSB1820 ID:s? HOw do I update the Z-Uno to 2.07? Is that the same as "Burn Bootloader"?
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Please share example .ino with multiple DS18B20?

Post by michap »

n0ir wrote:HOw do I update the Z-Uno to 2.07?
See the topic from PoltoS https://forum.z-wave.me/viewtopic.php?f=3427&t=24150
After updating software you must burn a new bootloader.

Yes, ID's will be detected then.
I would wait a little bit - if you want to be sure - it is a release candidate only - and the samples are not online just now.

Michael
A.Harrenberg
Posts: 201
Joined: 05 Sep 2016 22:27

Re: Please share example .ino with multiple DS18B20?

Post by A.Harrenberg »

Hi,

yes, waiting a litte seems to be a good idea as it seems that there are some issues with 2.07 that are not fully explained...
I have a 2.07 now on my normal machine but can go back to 2.06 on a linux server or on my laptop...

Regards,
Andreas.
fhem.de - ZWave development support
n0ir
Posts: 21
Joined: 17 Nov 2016 16:17

Re: Please share example .ino with multiple DS18B20?

Post by n0ir »

Not having to manually define the sensor ID would be very helpful. The DS18B20 probes I want to read is connected to warm water tanks, and I can't reach them easily. I will wait until stable FW 2.07 and try again. Maybe there will then also be some better example sketches from Z-Uno manufacturer.
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Please share example .ino with multiple DS18B20?

Post by michap »

With 2.07 the provided sample code (in IDE) is working fine ;)
No more needs to define the addresses before - will be scanned.

For debugging via USB edit the line

Code: Select all

#define MY_SERIAL Serial
Michael
n0ir
Posts: 21
Joined: 17 Nov 2016 16:17

Re: Please share example .ino with multiple DS18B20?

Post by n0ir »

Great! :)

I managed to update to 2.07.

What sketch should I upload to the Z-Uno to automatically scan and send temperatures from multiple DS18B20? I have these examples in IDE:
2016-12-16.png
2016-12-16.png (23.62 KiB) Viewed 10525 times
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Please share example .ino with multiple DS18B20?

Post by michap »

"DS18B20Scanner" of course :)

Michael
n0ir
Posts: 21
Joined: 17 Nov 2016 16:17

Re: Please share example .ino with multiple DS18B20?

Post by n0ir »

Weird. I have uploaded this example to the Z-Uno but I don't get anything in the serial monitor? I have pressed the reset button after uploading and tried to disconnect the Z-Uno from the computer.
2016-12-16 (1).png
2016-12-16 (1).png (71.77 KiB) Viewed 10525 times
However, am I wrong to assume that that sketch seems to scan for DS18B20 ID:s? I have already found out ID using other sketches. I thought 2.07 would be able to find 1-wire sensors automatically in sketches?

I would like a sketch that automatically find multiple connected DS18B20 and send the values to my controller.
Post Reply