Hi!
I'm trying to build a replacement for my Fibaro Universal Sensor using a Z-Uno (mainly because the Z-Uno support Z-Wave+).
I want to connect 4 DSB18B20 temperature sensors, 1 input from an existing relay (on the Fibaro Universal Sensor this input was connected to one of the binary sensor inputs) and 1 HC-SR04 Ultrasonic Distance Module (this was not connected to the Fibaro Universal Sensor).
I am still working out using sketches and would like some guidance how to implement multiple devices in the same sketch. Could I have one text file (.ino) for each sensor type and then upload it to the Z-Uno as a combined bootloader? Can I use three ready-made examples (one for temperature, one for the relay and one for distance) in the same sketch and upload these together to the Z-Uno?
Sorry if this is really simple! I am no programmer and is currently just using available snippets of code...
[newbie] Help with multi-channel sketch!
-
- Posts: 201
- Joined: 05 Sep 2016 22:27
Re: [newbie] Help with multi-channel sketch!
Hi,
you have to use one single *.ino file with all the definitions of the different sensors and inputs.
There is the 10-channel example that uses different types of sensors and I think this is a good starting point.
The code is fairly simple and should give you everything you need.
Regards,
Andreas.
you have to use one single *.ino file with all the definitions of the different sensors and inputs.
There is the 10-channel example that uses different types of sensors and I think this is a good starting point.
The code is fairly simple and should give you everything you need.
Regards,
Andreas.
fhem.de - ZWave development support
Re: [newbie] Help with multi-channel sketch!
Thank you for your help!
I have used the 10-channel example as a base for my device, but my lack of coding experience is showing... :S
Because I want to use 4 x DSB18B20 I have included the OneWire Library as described in the this tutorial http://www.tweaking4all.com/hardware/ar ... re-sensor/.
However, I can't seem to understand what kind of input to use for the relay. The relay is connected to a electrical device (a heater) that outputs a 230V current when something as wrong (like an alarm). This is used to turn on a light/siren. I have connected a NO relay to this output, so when something is wrong with the device this changes the relay to closed.
Should I use a motion sensor for this relay or something else?
I read something about ZUNO_SENSOR_BINARY_HEAT(getter) in the http://z-uno.z-wave.me/Reference/ZUNO_SENSOR_BINARY/. Would this be more fitting?
I have used the 10-channel example as a base for my device, but my lack of coding experience is showing... :S
Because I want to use 4 x DSB18B20 I have included the OneWire Library as described in the this tutorial http://www.tweaking4all.com/hardware/ar ... re-sensor/.
However, I can't seem to understand what kind of input to use for the relay. The relay is connected to a electrical device (a heater) that outputs a 230V current when something as wrong (like an alarm). This is used to turn on a light/siren. I have connected a NO relay to this output, so when something is wrong with the device this changes the relay to closed.
Should I use a motion sensor for this relay or something else?
I read something about ZUNO_SENSOR_BINARY_HEAT(getter) in the http://z-uno.z-wave.me/Reference/ZUNO_SENSOR_BINARY/. Would this be more fitting?
Re: [newbie] Help with multi-channel sketch!
I think it maybe too complicated with many "ping-pong" here at the forum ...
If you like I can explain some steps via Skype -if you use it, maybe more effective.
Write me a PM with your Skype account, I will contact you then.
Best regards
Michael
If you like I can explain some steps via Skype -if you use it, maybe more effective.
Write me a PM with your Skype account, I will contact you then.
Best regards
Michael