Search found 17 matches

by KristjanV
20 Jul 2018 11:12
Forum: Z-Uno
Topic: HC-SR04 and DS18B20 help?
Replies: 25
Views: 4117

Re: HC-SR04 and DS18B20 help?

Here's the code i used. Doesn't look too good but it works (for me). Feel free to adjust and fix =) And BIG THANKS to you all who helped me get this thing working! -PoltoS -mdietinger@gmail.com -p0lyg0n1 // 4 temperature sensors DS18B20, 1 ultrasonic distance sensor HC-SR04 #include "ZUNO_DS18B20.h"...
by KristjanV
16 Jul 2018 08:03
Forum: Z-Uno
Topic: HC-SR04 and DS18B20 help?
Replies: 25
Views: 4117

Re: HC-SR04 and DS18B20 help?

PoltoS wrote:
15 Jul 2018 01:00
Can we share your project with a reference to you on our site?
Yes ofcourse, no problem!
by KristjanV
12 Jul 2018 08:38
Forum: Z-Uno
Topic: HC-SR04 and DS18B20 help?
Replies: 25
Views: 4117

Re: HC-SR04 and DS18B20 help?

Other than that, the project turned out quite well. I have put Z-Uno and Vera Edge into one box. The whole idea was to make a device that can measure different temperatures and also pellet bunker fulfillment level and you can access that information through mobile phone plus get notifications when t...
by KristjanV
11 Jul 2018 10:00
Forum: Z-Uno
Topic: HC-SR04 and DS18B20 help?
Replies: 25
Views: 4117

Re: HC-SR04 and DS18B20 help?

Thanks man! But... now for some reason ultrasonic reading is a bit off. In code i have deviation 10cm and tank height 110cm so every 10cm in real life shoulb be 10% in the reading. But it isn't. If i move an object 10cm the reading drops only 4%. I have input voltage for Z-Uno on 5.02V, so that shou...
by KristjanV
10 Jul 2018 14:03
Forum: Z-Uno
Topic: HC-SR04 and DS18B20 help?
Replies: 25
Views: 4117

Re: HC-SR04 and DS18B20 help?

Sorry, my bad, got it working now. Got some numbers wrong in getter's Changed that part and now its working! // Getters. Add more if you need more sensors word getterTemp1() { return temperature[0]; } word getterTemp2() { return temperature[1]; } word getterTemp3() { return temperature[2]; } word ge...
by KristjanV
10 Jul 2018 13:48
Forum: Z-Uno
Topic: HC-SR04 and DS18B20 help?
Replies: 25
Views: 4117

Re: HC-SR04 and DS18B20 help?

Cheers! Got it working now. Only thing is, i added 2 more temp sensors so now it's 4 temps sensors and one ultrasonic sensor. In the code i wrote 4 temp sensors and added lines as needed, for ultrasonic i wrote zunoSendReport(5); first 3 temp sensors work as they should, ultrasonic reads distance in...
by KristjanV
04 Jul 2018 15:19
Forum: Z-Uno
Topic: HC-SR04 and DS18B20 help?
Replies: 25
Views: 4117

Re: HC-SR04 and DS18B20 help?

Your just updating the temperature sensors in code: zunoSendReport(i + 1) and zunoSendReport(1); You need to add: zunoSendReport(3); Thanks, will try it out right now. Silly question but, does it matter where i put zunoSendReports? One here void loop() { for (byte i = 0; i < number_of_sensors && i ...
by KristjanV
04 Jul 2018 09:09
Forum: Z-Uno
Topic: HC-SR04 and DS18B20 help?
Replies: 25
Views: 4117

Re: HC-SR04 and DS18B20 help?

I have combined two codes like this at the moment // Multiple temperature sensors DS18B20 #include "ZUNO_DS18B20.h" #define DS18B20_BUS_PIN 11 // Pin to which DS18B20 bus is connected #define N_SENSOR 2 // Number of DS18B20 sensors // You need to adopt ZUNO_SETUP_CHANNELS and add more getters if tou...
by KristjanV
02 Jul 2018 13:16
Forum: Z-Uno
Topic: HC-SR04 and DS18B20 help?
Replies: 25
Views: 4117

Re: HC-SR04 and DS18B20 help?

Also now that i got this part working, i need to combine the distance sensor with temperature sensors. So this code // HC-SR04 Ultrasonic Distance Sensor ZUNO_SETUP_CHANNELS( ZUNO_SENSOR_MULTILEVEL_GENERAL_PURPOSE(getter) ); int readPin = 9; int triggerPin = 10; byte controlState = 0; byte percentag...
by KristjanV
02 Jul 2018 12:25
Forum: Z-Uno
Topic: HC-SR04 and DS18B20 help?
Replies: 25
Views: 4117

Re: HC-SR04 and DS18B20 help?

You didn't put in: zunoSendReport(1); Yep! Got it working now, only problem is, below 80% ( i set deviation to 10cm and tank height 110cm) in every 10cm which is also 10%, it goes off by 1%. So in example if i set the object from the sensor to a distance of 30cm, it gives me the tank fillment of 80...