     // initialize DS18B20 "one wire" probes
     g_ds18b20_sensor.set_name(DSB18B20_SNSR_NAME_PREFIX);
     g_ds18b20_sensor.set_pin(START_PIN_DS18B20_SNSRS);
+    
+    // initialize HC-SR04 ultrasonic distance sensor:
+    g_sr04_sensor.set_name(SR04_SNSR_NAME_PREFIX);
+    g_sr04_sensor.set_pin(START_PIN_HCSR04_SNSRS);
 }
 
 void loop()

#define NUM_FLOAT_SWTCHS  1
#define NUM_H20_SNSRS     2
#define NUM_FEED_VALVES   1

#define FLOAT_SWTCH_NAME_PREFIX   "FloatSwitch"
#define RELAY_SWTCH_NAME_PREFIX   "RelaySwitch"
#define DHT22_SNSR_NAME_PREFIX    "DHT22Sensor"
#define DSB18B20_SNSR_NAME_PREFIX "DS18B20Sensor"

CAnalogFloatSwitch g_float_switch;
CRelay             g_relay_switches[NUM_RELAY_SWTCHS];
CDht22Sensor       g_dht22_sensors[NUM_DHT22_SNSRS];
CDs18b20Sensor     g_ds18b20_sensor;  // these probes are all on 1 wire

#define DBG 1 // turn on to get detailed debug info
#if DBG == 0

#include "base_device.h"
#include "analog_float_switch.h"
#include "relay_switch.h"
#include "dht22_sensor.h"   // DHT-22 temp/humidity sensor
#include "ds18b20_sensor.h" // one-wire temperature probe
#include "hcsr04_sensor.h"  // HC-SR04 ultrasonic distance sensor

#define DELAY 500

