With the wine in the tanks and vineyard work winding down, this is a good moment to share the programming part of the Vinduino soil moisture sensor. For a description of the hardware and how to make a gypsum block soil moisture sensor, please refer to the previous "Vinduino" postings.

The program below can be used for a very basic version without LCD display, or for a version with LCD display as shown in the picture.To use below code without display, you can remove the programming lines starting with "lcd.set" and " lcd.print". Also the library code "LiquidCrystal.h" is not needed.Programming the Arduino board is easy. Download the latest software code version here and upload the code to the Arduino board.