Over the past few days I have been thinking about active environments and what makes up an active environment. Something that has come to mind is moisture and humidity/temperature. So I thought I would buy a couple of sensors and try it out with Arduino.
I have never really got to grips with Arduino and have been a bit scared to use it but now that I am getting into Max MSP, I can input the data straight into max by using Maxuino then I’ll have a better understand of how it all works – and probably a lot more successful. Having used basic Arduino in the past and remember slight bits of what I did (but not understanding why I had to do certain things) was actually really helpful.
A have an Arduino Uno. The first thing I needed to do was uploads the Standard Firmata (don’t really know what this is but hey). After that, to check whether it has uploaded correctly I needed to download a firmata app where I could see if the Arduino was running correctly.
Above is a digital temperature humidity sensor (dht11)
Above is a soil moisture sensor.
I spent ages trying to figure out how to get the data into max using the Maxuino Patch you can download online but was having a few problems. I tried to test the inbuilt LED light but it wouldn’t flash. So to make sure the Arduino wasn’t broken I tested in the Arduino IDE software. It worked so now I needed to figure out why it wasn’t working in MAX. But first of all, as I was in the Arduino I thought I might as well see how the sensors worked in the Arduino software itself. Luckily there are loads of copy and paste coding for this online. I had to first download a particular library for each sensor.
After I uploaded the code, in the arduino software I went to Tools>Serial Monitor to see the data coming in from the sensors.
The dht11 showed the Humidity and Temperature but couldn’t understand why is was say -999.00. I search it up and it said to change the delay from 1000 to 2000 but it didn’t change what ever I did…
So I hooked up the Soil Moisture sensor I put the sensor in the soil of one of the plants and then in the did the same (Tools>Serial Monitor). This time I got some results and was pretty happy to see it was working – and that I managed to do something really simple in Arduino. The results were ‘Raining’ which was useful… but I really need numbers – this is where I knew that in Max it would be pretty easy to get that.