Story
It all starts with installing Windows 10 IoT on a suitable device. I used a Raspberry Pi 2 (Model B) and installed the creators update of Windows 10 IoT. You should really get the dashboard from Microsoft: https://developer.microsoft.com/en-us/windows/iot/downloads.
It is really easy to get Windows 10 IoT on your device. Here is a small manual: https://developer.microsoft.com/en-us/windows/iot/docs/iotdashboard.
If you have your Visual Studio 2017 configured, you can easy deploy to it.
The hardware
I bought stuff from Aliexpress. I had no rush, so I saved a lot of money.
I was inspired by this article but that referenced to a moisture sensor for 4 gbp and shipping was also 4 gbp. So just the sensor could cost me 9,40 eur. Which makes it less fun, because the whole idea of a Raspberry Pi is that you can make an Internet of Things device with little costs.
I spent only 42 cents on the sensor and bought some male/female, male/male, female/female jumper cables, too, and even an HDMI to DVI connector so I could connect an external monitor, but I never used it.
- Moisture sensor € 0,42
- Jumper cables € 2,19
- HDMI to DVI adapter € 1,14 (optional)
So I had to spend € 2,61 euro, including shipping, to get the parts for my Pi 2.
Hardware wiring
Connect the probe to the sensor with two wires. It doesn’t matter which goes where.
- Moisture sensor € 0,42
- Jumper cables € 2,19
- HDMI to DVI adapter € 1,14 (optional)
So I had to spend € 2,61 euro, including shipping, to get the parts for my Pi 2.
Hardware wiring
Connect the probe to the sensor with two wires. It doesn’t matter which goes where.
This is a good page for gpio pins: http://www.raspberrypi-spy.co.uk/2012/06/simple-guide-to-the-rpi-gpio-header-and-pins/.
Software
I hit a strange bug with the UWP but fixed it, thanks to stack overflow, by manually creating a project.json file. As previously stated, I was inspired by this article but that is coded in Python. My preference language is still C# and I wanted to try Win 10 IoT. So I rewrote this Python code to C# and got this:
For more detail: PiPlant: Check Moisture with Sensor on Windows 10 IoT