

Building an Arduino-powered, mobile-controlled irrigation system - StavrosK
http://www.stavros.io/posts/arduino-powered-irrigation-system/

======
robryk
It seems to me that the following is liable to misclassify some pressure drop
events as normal shutoffs: > } else if ((statesChanged[2] == 1 && pinStates[2]
== OFF) && > (statesChanged[3] == 1 && pinStates[3] == OFF)) {

We look at the relay outputs twice a second and expect to see two of them
switch within the same half-second in some cases. Even if they were actually
depowered at the same instant in time, you'd often get a tens of millis window
when one of them is already off, but the other isn't; then (irrespective of
which was off first) you'd get a "Pump stopped" notification instead of a
"Pressure dropped" notification. Am I missing something obvious or is that
case just rare enough that handling it isn't worth the complexity?

------
louwrentius
I really like how this kind of technology is finally very cheap and even
usable for non-experts.

However, why is it that this kind of electronics is only ever used to irrigate
plants, open/close doors or windows and maybe control lights in a room.

The arduino platform seems very popular, yet where are the really amazing
projects? It really seems like it's just some kind of Lego for grownups. I
bought some of this stuff too and it is cool to play with electronics, but it
seems to me this stuff is merely good for learning electronics and just a fun
hobby.

~~~
tdicola
I've done some fun stuff with Arduinos, but sadly when I try to post it here
it never makes it to the front page. For example check out this smart cocktail
shaker project that uses Arduino & Android with a kitchen scale:
[http://learn.adafruit.com/smart-cocktail-
shaker](http://learn.adafruit.com/smart-cocktail-shaker)

~~~
malandrew
Cool project, this combined with a database where you told it what ingredients
you had available and it told you all the drink recipes that are you can
possibly make would be killer for learning new drinks at home. Furthermore,
also suggesting ingredients you should add to your bar next to maximize the
number of new recipes available to you would be amazing. Add the ability to
keep track of what you tried and your ability to add star ratings per drink
would be an amazing product. I can think of few better ways to explore the
world of cocktails and keep track of what you really enjoy in a drink.

------
vkatluri
Indian farmers were doing something similar back in 2009:
[http://www.pcworld.com/article/168895/article.html](http://www.pcworld.com/article/168895/article.html)

------
Aardwolf
How secure is it to connect an Arduino to the internet? Does it support any
secure protocols?

~~~
tdicola
Not directly--with only 32kb of program space in the Arduino Uno you can just
barely get a wifi stack in (see the CC3000 chip), but there's no room left for
SSL or anything secure.

A better option is something like the Arduino Yun which has two processors, a
small Atmel microcontroller and an Atheros system on a chip running OpenWRT
linux. The linux processor can act as a bridge to let the microcontroller
communicate with the internet pretty easily.

~~~
runjake
At that point, just use a RaspberryPi unless you're specifically doing it for
the challenge of it. Arduino is fun though.

~~~
Sanddancer
Not really. There are some pretty considerable disadvantages to using the
Raspberry Pi for the sorts of things the Arduino excels at. There are more,
more resilient GPIO ports, there are more ADC ports, there are more PWM ports,
the Yun can enumerate itself as a USB slave device, which can allow for all
sorts of other cool uses, etc. Each device has pros and cons that you have to
take into consideration.

~~~
plumeria
What are some uses of a USB slave device?

~~~
Sanddancer
It can be, to your computer, like any other USB device. So you can set it up
to be a USB keyboard, USB joystick, USB storage device, etc. So, when you plug
it in, you can have it set up that configuring the device, or getting logs,
works like any other file operation, similar to how the wifly looks to a
camera like just another sd card. Or have it enumerate as a usb input device,
and use it to control and be controlled by a pdp 11 front panel (
[http://retrocmp.com/projects/pdp-1170-panel/25-pdp-1170-cons...](http://retrocmp.com/projects/pdp-1170-panel/25-pdp-1170-console-
panel) ). In short, it lets you tie whatever real-world interface device
you've made to whatever pre-existing computing metaphor makes the most
sense...or creating your own driver to let the sky be the limit.

~~~
plumeria
Cool, thanks for the explanation.

