Hello,
I'd need to make a program that would control the (degrees) from two hydroscopes (SparkFun RHT03) and if the humidity of one of them will be higher than the other , the switch will turn turn on for example PIN5. I have no idea what to do. Can anyone help me? Thank you.
First of all, brilliant title sir! :
Of course you want help, that's why you're here. But with what?
But what to do, get yourself an Arduino, get to know the basics, Google a bit about the sensor and start making code.
THEN, when you have a error somewhere or you're stuck, come back here and ask some questions including schematics and code ![]()
To add to what @septillion has said I suspect that Sparkfun has some example programs for their device.
...R
I don't understand what "control the degrees" might mean. I suspect we have a non-native english speaker here.
Yes, flipping a pin based on the readings of two sensors is very do-able. Let's have a look at … yeah. The sample code is pretty nasty. And it's in a word document or some horror - oh, there's a github. Well, that something at least.
It uses a 1-wire protocol, so timing is important. And they have defined their own names for various types instead of using type.h for absolutely no reason whatever that I can see. I'm also reasonably certain that it won't compile: SendData lacks a type specifier. Oh - and the Delay() function has a loop that will get optimised out and so it won't do anything.
Good luck.
Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html
As has been said before, the site that you got the Humidity sensors has example sketches using your sensor.
Thanks.. Tom... ![]()
PaulMurrayCbr:
The sample code is pretty nasty.
Wow, I just lost so much respect for SparkFun. Anyone who is recommending a beginner to try that sample code needs to take a look first: https://github.com/sparkfun/RHT03/blob/master/Firmware/RHT03_Example/RHT03_Example.ino.
There are multiple well written libraries for the DHT22 with easy to understand examples. I don't have one of these sensors but here are a couple of popular ones: