My gardening for dumdums project has got sidetracked, mostly because it’s coming on to winter in NZ and it rains so much here in winter that trench foot is the main concern, not your plants’ well being.
I got bored of developing the RaspPi sides of things – see here. Spoiler alert: after settling on Windows 10 IoT & C#, I went with Android Things & Java. I bought a flow sensor off AliExpress and decided to fiddle with that for a bit.
It uses the Hall effect (apparently…and so is in effect contactless/brushless…and should last…though it was 10bucks) to detect how fast a little turbine is spinning. I figured ‘at some point’ I could go a little fusion and use rainfall stats (from the web or a weather station) & this flow sensor to know how much water is going on to my garden and to correct things accordingly. Seems a long way off now sitting by the fire in the winter dark. Ho hum.
The thing about the RaspPi it that it does not really do directly plugging into sensors too well, but Arduinos do. So, want I have done is:
Use UART to connect the an Arduino Micro to the RaspPi-running-Android Things. I was going to go with simple USB connection but decided not to. Cannot remember why.Connect my ‘ ‘ tp the Arduino.
Having gone to the trouble of this mean that I could have just use the Arduino to control some relays
I got halfway through doing the above (the soldering. Grrr!) and stopped. I remembered that while wallowing in Windows 10 IoT I had seen a sample for a flow sensor directly plugged into the RaspPi pins using the GPIO. I figure: if it works for Win10 IoT, it’ll work for Android Things, just need to port over the C#.
This is a relief (provided I can get it working!). Introducing the Arduino is a hassle:
- a load of soldering – HATE
- it means I need to have another load of code running on the Arduino – HATEx2, and;
- I cannot update it from Google Play over-the-air – HATEx3.
Its a lot of hate right, right?