Hi all!
I was looking for a fun project to work with and came up with the idea of making an in-door irrigation system for my more expensive plants. The idea is:
1) Create a device that can measure humidity from the soil
2) Report the humidity once per hour to a web API that I'll be writing.
3) From the web service, provide instructions for opening/closing a valve that releases water into the plant
Additionally, I will be looking into weather forecasts to recommend misting the leaves of the plants is the day was hot and warm (so, a third device reporting temperature). Further down the timeline, something to trigger the window blinds to shield the plants from too much direct sun would be easy to make I hope.
But I am oooooooojust beginning!
So far, I've obtained the SDK for .Net Micro, as well as downloaded the Go SDK, both in versions 4.3. I can create a project, and when it's run, a device emulator with 5 buttons and a display show on up screen, accompanied with the message "Found Debugger" in the VS2012 console window.
I have not obtained the hardware yet. My idea is that I want to see a functional emulation of my plan before I invest in the hardware bits. I see it isn't cheap, the wifi module alone appears to cost around $89.
The big question is: How to I proceed to work with this code in emulator, so that I can test out my logic while I wait for the stuff to arrive? (Also, if you're in Norway and know a good place to buy the netduino GO, please let me know)
Here's what I'm trying to do:
public class Program { private const int FIVE_SECONDS = 5000; public static void Main() { DateTime _lastUpdate = DateTime.Now; // write your code here while (true) { var elapsed = DateTime.Now - _lastUpdate; if (elapsed.Hours >= 1) { ReportHumidityToWebService(); _lastUpdate = DateTime.Now; Thread.Sleep(FIVE_SECONDS); } } } private static void ReportHumidityToWebService() { throw new NotImplementedException(); } }