I'm always searching for new ideas for nice and simple M2M or Internet of Things (IoT) examples. A month ago I had a good idea. I came to our office and saw the plant next to my desk and it only had a few leaves. Maybe we watered this plant not often enough and I wanted to change it. Wouldn't it be nice if the plant waters itself or at least sends a message?
Because I didn't had any nails in the office, I used two paper clips. My colleagues looked a little bit confused, after I connected the Arduino with our dying plant. This was my first try:
How can I measure the soil moisture?
I thought about this idea and my first question was, how I can measure the soil moisture with simple tools. Luckily the answer was only one google search away. I just had to stick two nails or other long and thin metal sticks into the soil and connect it with an Arduino like this:Because I didn't had any nails in the office, I used two paper clips. My colleagues looked a little bit confused, after I connected the Arduino with our dying plant. This was my first try:
And with a few lines of code, I got my first readings.
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.print("Soil moisture: ");
Serial.println(analogRead(A0));
delay(1000);
}
Until now, it is nothing new. There are already some Arduino gardening examples on the internet. Also with light and temperature sensor or with pump which starts automatically when the soil is dry. There is something more needed for an M2M solution. I have to connect it somehow with a network.


No comments:
Post a Comment