Skip to content

Commit 7a5b224

Browse files
committed
Naming Convention fixes & SensorDigitalOutput review
1 parent 7125bf0 commit 7a5b224

File tree

4 files changed

+287
-301
lines changed

4 files changed

+287
-301
lines changed

NodeManager.ino

Lines changed: 56 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -42,58 +42,59 @@ Once created, the sensor will automatically present one or more child to the gat
4242
and controller. A list of buil-in sensors, module to enable, required dependencies
4343
and the number of child automatically created is presented below:
4444
45-
Sensor Name |#Child | Module to enable | Description | Dependencies
46-
--------------------|-------|--------------------|---------------------------------------------------------------------------------------------------|----------------------------------------------------------
47-
SensorBattery | 1 | USE_BATTERY | Built-in sensor for automatic battery reporting | -
48-
SensorSignal | 1 | USE_SIGNAL | Built-in sensor for automatic signal level reporting | -
49-
SensorConfiguration | 1 | USE_CONFIGURATION | Built-in sensor for OTA remote configuration of any registered sensor | -
50-
SensorAnalogInput | 1 | USE_ANALOG_INPUT | Generic analog sensor, return a pin's analog value or its percentage | -
51-
SensorLDR | 1 | USE_ANALOG_INPUT | LDR sensor, return the light level of an attached light resistor in percentage | -
52-
SensorRain | 1 | USE_ANALOG_INPUT | Rain sensor, return the percentage of rain from an attached analog sensor | -
53-
SensorSoilMoisture | 1 | USE_ANALOG_INPUT | Soil moisture sensor, return the percentage of moisture from an attached analog sensor | -
54-
SensorThermistor | 1 | USE_THERMISTOR | Thermistor sensor, return the temperature based on the attached thermistor | -
55-
SensorML8511 | 1 | USE_ML8511 | ML8511 sensor, return UV intensity | -
56-
SensorACS712 | 1 | USE_ACS712 | ACS712 sensor, measure the current going through the attached module | -
57-
SensorDigitalInput | 1 | USE_DIGITAL_INPUT | Generic digital sensor, return a pin's digital value | -
58-
SensorDigitalOutput | 1 | USE_DIGITAL_OUTPUT | Generic digital output sensor, allows setting the digital output of a pin to the requested value | -
59-
SensorRelay | 1 | USE_DIGITAL_OUTPUT | Relay sensor, allows activating the relay | -
60-
SensorLatchingRelay | 1 | USE_DIGITAL_OUTPUT | Latching Relay sensor, allows activating the relay with a pulse | -
61-
SensorDHT11 | 2 | USE_DHT | DHT11 sensor, return temperature/humidity based on the attached DHT sensor | https://github.com/mysensors/MySensorsArduinoExamples/tree/master/libraries/DHT
62-
SensorDHT22 | 2 | USE_DHT | DHT22 sensor, return temperature/humidity based on the attached DHT sensor | https://github.com/mysensors/MySensorsArduinoExamples/tree/master/libraries/DHT
63-
SensorSHT21 | 2 | USE_SHT21 | SHT21 sensor, return temperature/humidity based on the attached SHT21 sensor | https://github.com/SodaqMoja/Sodaq_SHT2x
64-
SensorHTU21D | 2 | USE_SHT21 | HTU21D sensor, return temperature/humidity based on the attached HTU21D sensor | https://github.com/SodaqMoja/Sodaq_SHT2x
65-
SensorInterrupt | 1 | USE_INTERRUPT | Generic interrupt-based sensor, wake up the board when a pin changes status | -
66-
SensorDoor | 1 | USE_INTERRUPT | Door sensor, wake up the board and report when an attached magnetic sensor has been opened/closed | -
67-
SensorMotion | 1 | USE_INTERRUPT | Motion sensor, wake up the board and report when an attached PIR has triggered | -
68-
SensorDs18b20 | 1+ | USE_DS18B20 | DS18B20 sensor, return the temperature based on the attached sensor | https://github.com/milesburton/Arduino-Temperature-Control-Library
69-
SensorBH1750 | 1 | USE_BH1750 | BH1750 sensor, return light level in lux | https://github.com/claws/BH1750
70-
SensorMLX90614 | 2 | USE_MLX90614 | MLX90614 contactless temperature sensor, return ambient and object temperature | https://github.com/adafruit/Adafruit-MLX90614-Library
71-
SensorBME280 | 4 | USE_BME280 | BME280 sensor, return temperature/humidity/pressure based on the attached BME280 sensor | https://github.com/adafruit/Adafruit_BME280_Library
72-
SensorBMP085 | 3 | USE_BMP085 | BMP085/BMP180 sensor, return temperature and pressure | https://github.com/adafruit/Adafruit-BMP085-Library
73-
SensorBMP280 | 3 | USE_BMP280 | BMP280 sensor, return temperature/pressure based on the attached BMP280 sensor | https://github.com/adafruit/Adafruit_BMP280_Library
74-
SensorSonoff | 1 | USE_SONOFF | Sonoff wireless smart switch | https://github.com/thomasfredericks/Bounce2
75-
SensorHCSR04 | 1 | USE_HCSR04 | HC-SR04 sensor, return the distance between the sensor and an object | https://github.com/mysensors/MySensorsArduinoExamples/tree/master/libraries/NewPing
76-
SensorMCP9808 | 1 | USE_MCP9808 | MCP9808 sensor, measure the temperature through the attached module | https://github.com/adafruit/Adafruit_MCP9808_Library
77-
SensorMQ | 1 | USE_MQ | MQ sensor, return ppm of the target gas | -
78-
SensorMHZ19 | 1 | USE_MHZ19 | MH-Z19 CO2 sensor via UART (SoftwareSerial, default on pins 6(Rx) and 7(Tx) | -
79-
SensorAM2320 | 2 | USE_AM2320 | AM2320 sensors, return temperature/humidity based on the attached AM2320 sensor | https://github.com/thakshak/AM2320
80-
SensorTSL2561 | 1 | USE_TSL2561 | TSL2561 sensor, return light in lux | https://github.com/adafruit/TSL2561-Arduino-Library
81-
SensorPT100 | 1 | USE_PT100 | DFRobot Driver high temperature sensor, return the temperature from the attached PT100 sensor | -
82-
SensorDimmer | 1 | USE_DIMMER | Generic dimmer sensor used to drive a pwm output | -
83-
SensorRainGauge | 1 | USE_PULSE_METER | Rain gauge sensor | -
84-
SensorPowerMeter | 1 | USE_PULSE_METER | Power meter pulse sensor | -
85-
SensorWaterMeter | 1 | USE_PULSE_METER | Water meter pulse sensor | -
86-
SensorPlantowerPMS | 3 | USE_PMS | Plantower PMS particulate matter sensors (reporting PM<=1.0, PM<=2.5 and PM<=10.0 in µg/m³) | https://github.com/fu-hsi/pms
87-
SensorVL53L0X | 1 | USE_VL53L0X | VL53L0X laser time-of-flight distance sensor via I²C, sleep pin supported (optional) | https://github.com/pololu/vl53l0x-arduino
88-
DisplaySSD1306 | 1 | USE_SSD1306 | SSD1306 128x64 OLED display (I²C); By default displays values of all sensors and children | https://github.com/greiman/SSD1306Ascii.git
89-
SensorSHT31 | 2 | USE_SHT31 | SHT31 sensor, return temperature/humidity based on the attached SHT31 sensor | https://github.com/adafruit/Adafruit_SHT31
90-
SensorSI7021 | 2 | USE_SI7021 | SI7021 sensor, return temperature/humidity based on the attached SI7021 sensor | https://github.com/sparkfun/SparkFun_Si701_Breakout_Arduino_Library
91-
SensorChirp | 3 | USE_CHIRP | Chirp soil moisture sensor (includes temperature and light sensors) | https://github.com/Apollon77/I2CSoilMoistureSensor
92-
DisplayHD44780 | 1 | USE_HD44780 | Supports most Hitachi HD44780 based LCDs, by default displays values of all sensors and children | https://github.com/cyberang3l/NewLiquidCrystal
93-
SensorTTP | 1 | USE_TTP | TTP226/TTP229 Touch control sensor | -
94-
SensorServo | 1 | USE_SERVO | Control a generic Servo motor sensor | -
95-
SensorAPDS9960 | 1 | USE_APDS9960 | SparkFun RGB and Gesture Sensor | https://github.com/sparkfun/APDS-9960_RGB_and_Gesture_Sensor
96-
SensorNeopixel | 1 | USE_NEOPIXEL | Control a Neopixel LED | https://github.com/adafruit/Adafruit_NeoPixel
45+
Sensor Name |#Child | Module to enable | Description | Dependencies
46+
-------------------------|-------|--------------------|---------------------------------------------------------------------------------------------------|----------------------------------------------------------
47+
SensorBattery | 1 | USE_BATTERY | Built-in sensor for automatic battery reporting | -
48+
SensorSignal | 1 | USE_SIGNAL | Built-in sensor for automatic signal level reporting | -
49+
SensorConfiguration | 1 | USE_CONFIGURATION | Built-in sensor for OTA remote configuration of any registered sensor | -
50+
SensorAnalogInput | 1 | USE_ANALOG_INPUT | Generic analog sensor, return a pin's analog value or its percentage | -
51+
SensorLDR | 1 | USE_ANALOG_INPUT | LDR sensor, return the light level of an attached light resistor in percentage | -
52+
SensorRain | 1 | USE_ANALOG_INPUT | Rain sensor, return the percentage of rain from an attached analog sensor | -
53+
SensorSoilMoisture | 1 | USE_ANALOG_INPUT | Soil moisture sensor, return the percentage of moisture from an attached analog sensor | -
54+
SensorThermistor | 1 | USE_THERMISTOR | Thermistor sensor, return the temperature based on the attached thermistor | -
55+
SensorML8511 | 1 | USE_ML8511 | ML8511 sensor, return UV intensity | -
56+
SensorACS712 | 1 | USE_ACS712 | ACS712 sensor, measure the current going through the attached module | -
57+
SensorDigitalInput | 1 | USE_DIGITAL_INPUT | Generic digital sensor, return a pin's digital value | -
58+
SensorDigitalOutput | 1 | USE_DIGITAL_OUTPUT | Generic digital output sensor, allows setting the digital output of a pin to the requested value | -
59+
SensorRelay | 1 | USE_DIGITAL_OUTPUT | Relay sensor, allows activating the relay | -
60+
SensorLatchingRelay1Pin | 1 | USE_DIGITAL_OUTPUT | Latching Relay sensor, allows toggling the relay with a pulse on the configured pin | -
61+
SensorLatchingRelay2Pins | 1 | USE_DIGITAL_OUTPUT | Latching Relay sensor, allows turing the relay on and off with a pulse on the configured pins | -
62+
SensorDHT11 | 2 | USE_DHT | DHT11 sensor, return temperature/humidity based on the attached DHT sensor | https://github.com/mysensors/MySensorsArduinoExamples/tree/master/libraries/DHT
63+
SensorDHT22 | 2 | USE_DHT | DHT22 sensor, return temperature/humidity based on the attached DHT sensor | https://github.com/mysensors/MySensorsArduinoExamples/tree/master/libraries/DHT
64+
SensorSHT21 | 2 | USE_SHT21 | SHT21 sensor, return temperature/humidity based on the attached SHT21 sensor | https://github.com/SodaqMoja/Sodaq_SHT2x
65+
SensorHTU21D | 2 | USE_SHT21 | HTU21D sensor, return temperature/humidity based on the attached HTU21D sensor | https://github.com/SodaqMoja/Sodaq_SHT2x
66+
SensorInterrupt | 1 | USE_INTERRUPT | Generic interrupt-based sensor, wake up the board when a pin changes status | -
67+
SensorDoor | 1 | USE_INTERRUPT | Door sensor, wake up the board and report when an attached magnetic sensor has been opened/closed | -
68+
SensorMotion | 1 | USE_INTERRUPT | Motion sensor, wake up the board and report when an attached PIR has triggered | -
69+
SensorDs18b20 | 1+ | USE_DS18B20 | DS18B20 sensor, return the temperature based on the attached sensor | https://github.com/milesburton/Arduino-Temperature-Control-Library
70+
SensorBH1750 | 1 | USE_BH1750 | BH1750 sensor, return light level in lux | https://github.com/claws/BH1750
71+
SensorMLX90614 | 2 | USE_MLX90614 | MLX90614 contactless temperature sensor, return ambient and object temperature | https://github.com/adafruit/Adafruit-MLX90614-Library
72+
SensorBME280 | 4 | USE_BME280 | BME280 sensor, return temperature/humidity/pressure based on the attached BME280 sensor | https://github.com/adafruit/Adafruit_BME280_Library
73+
SensorBMP085 | 3 | USE_BMP085 | BMP085/BMP180 sensor, return temperature and pressure | https://github.com/adafruit/Adafruit-BMP085-Library
74+
SensorBMP280 | 3 | USE_BMP280 | BMP280 sensor, return temperature/pressure based on the attached BMP280 sensor | https://github.com/adafruit/Adafruit_BMP280_Library
75+
SensorSonoff | 1 | USE_SONOFF | Sonoff wireless smart switch | https://github.com/thomasfredericks/Bounce2
76+
SensorHCSR04 | 1 | USE_HCSR04 | HC-SR04 sensor, return the distance between the sensor and an object | https://github.com/mysensors/MySensorsArduinoExamples/tree/master/libraries/NewPing
77+
SensorMCP9808 | 1 | USE_MCP9808 | MCP9808 sensor, measure the temperature through the attached module | https://github.com/adafruit/Adafruit_MCP9808_Library
78+
SensorMQ | 1 | USE_MQ | MQ sensor, return ppm of the target gas | -
79+
SensorMHZ19 | 1 | USE_MHZ19 | MH-Z19 CO2 sensor via UART (SoftwareSerial, default on pins 6(Rx) and 7(Tx) | -
80+
SensorAM2320 | 2 | USE_AM2320 | AM2320 sensors, return temperature/humidity based on the attached AM2320 sensor | https://github.com/thakshak/AM2320
81+
SensorTSL2561 | 1 | USE_TSL2561 | TSL2561 sensor, return light in lux | https://github.com/adafruit/TSL2561-Arduino-Library
82+
SensorPT100 | 1 | USE_PT100 | DFRobot Driver high temperature sensor, return the temperature from the attached PT100 sensor | -
83+
SensorDimmer | 1 | USE_DIMMER | Generic dimmer sensor used to drive a pwm output | -
84+
SensorRainGauge | 1 | USE_PULSE_METER | Rain gauge sensor | -
85+
SensorPowerMeter | 1 | USE_PULSE_METER | Power meter pulse sensor | -
86+
SensorWaterMeter | 1 | USE_PULSE_METER | Water meter pulse sensor | -
87+
SensorPlantowerPMS | 3 | USE_PMS | Plantower PMS particulate matter sensors (reporting PM<=1.0, PM<=2.5 and PM<=10.0 in µg/m³) | https://github.com/fu-hsi/pms
88+
SensorVL53L0X | 1 | USE_VL53L0X | VL53L0X laser time-of-flight distance sensor via I²C, sleep pin supported (optional) | https://github.com/pololu/vl53l0x-arduino
89+
DisplaySSD1306 | 1 | USE_SSD1306 | SSD1306 128x64 OLED display (I²C); By default displays values of all sensors and children | https://github.com/greiman/SSD1306Ascii.git
90+
SensorSHT31 | 2 | USE_SHT31 | SHT31 sensor, return temperature/humidity based on the attached SHT31 sensor | https://github.com/adafruit/Adafruit_SHT31
91+
SensorSI7021 | 2 | USE_SI7021 | SI7021 sensor, return temperature/humidity based on the attached SI7021 sensor | https://github.com/sparkfun/SparkFun_Si701_Breakout_Arduino_Library
92+
SensorChirp | 3 | USE_CHIRP | Chirp soil moisture sensor (includes temperature and light sensors) | https://github.com/Apollon77/I2CSoilMoistureSensor
93+
DisplayHD44780 | 1 | USE_HD44780 | Supports most Hitachi HD44780 based LCDs, by default displays values of all sensors and children | https://github.com/cyberang3l/NewLiquidCrystal
94+
SensorTTP | 1 | USE_TTP | TTP226/TTP229 Touch control sensor | -
95+
SensorServo | 1 | USE_SERVO | Control a generic Servo motor sensor | -
96+
SensorAPDS9960 | 1 | USE_APDS9960 | SparkFun RGB and Gesture Sensor | https://github.com/sparkfun/APDS-9960_RGB_and_Gesture_Sensor
97+
SensorNeopixel | 1 | USE_NEOPIXEL | Control a Neopixel LED | https://github.com/adafruit/Adafruit_NeoPixel
9798
9899
NodeManager provides useful built-in features which can be disabled if you need
99100
to save some storage for your code. To enable/disable a buil-in feature:
@@ -328,7 +329,8 @@ NodeManager node;
328329
//SensorDigitalInput digitalIn(node,6);
329330
//SensorDigitalOutput digitalOut(node,6);
330331
//SensorRelay relay(node,6);
331-
//SensorLatchingRelay latching(node,6);
332+
//SensorLatchingRelay1Pin latching1pin(node,6);
333+
//SensorLatchingRelay2Pins latching2pins(node,6,7);
332334
//SensorDHT11 dht11(node,6);
333335
//SensorDHT22 dht22(node,6);
334336
//SensorSHT21 sht21(node);
@@ -374,7 +376,7 @@ NodeManager node;
374376
void before() {
375377
// setup the serial port baud rate
376378
Serial.begin(MY_BAUD_RATE);
377-
379+
378380

379381

380382
/*

0 commit comments

Comments
 (0)