// [101] set the effect to use for a smooth transition, can be one of SensorDimmer::EASE_LINEAR, SensorDimmer::EASE_INSINE, SensorDimmer::EASE_OUTSINE, SensorDimmer::EASE_INOUTSINE (default: EASE_LINEAR)
voidsetEasing(intvalue);
// [102] the duration of entire the transition in seconds (default: 1)
voidsetDuration(intvalue);
// [103] the duration of a single step of the transition in milliseconds (default: 100)
voidsetStepDuration(intvalue);
// fade the output from the current value to the target provided in the range 0-100
NodeManager is intended to take care on your behalf of all those common tasks a MySensors node has to accomplish, speeding up the development cycle of your projects.
NodeManager is intended to take care on your behalf of all those common tasks a MySensors node has to accomplish, speeding up the development cycle of your projects.
NodeManager includes the following main components:
NodeManager includes the following main components:
SENSOR_AM2320 | AM2320 sensors, return temperature/humidity based on the attached AM2320 sensor
SENSOR_AM2320 | AM2320 sensors, return temperature/humidity based on the attached AM2320 sensor
SENSOR_PT100 | High temperature sensor associated with DFRobot Driver, return the temperature in C° from the attached PT100 sensor
SENSOR_PT100 | High temperature sensor associated with DFRobot Driver, return the temperature in C° from the attached PT100 sensor
SENSOR_BMP280 | BMP280 sensor, return temperature/pressure based on the attached BMP280 sensor
SENSOR_BMP280 | BMP280 sensor, return temperature/pressure based on the attached BMP280 sensor
SENSOR_DIMMER | Generic dimmer sensor used to drive a pwm output
To register a sensor simply call the NodeManager instance with the sensory type and the pin the sensor is conncted to and optionally a child id. For example:
To register a sensor simply call the NodeManager instance with the sensory type and the pin the sensor is conncted to and optionally a child id. For example:
~~~c
~~~c
...
@@ -688,6 +690,18 @@ Each sensor class can expose additional methods.
...
@@ -688,6 +690,18 @@ Each sensor class can expose additional methods.
voidsetAddress(intvalue);
voidsetAddress(intvalue);
~~~
~~~
* SensorDimmer
~~~c
// [101] set the effect to use for a smooth transition, can be one of SensorDimmer::EASE_LINEAR, SensorDimmer::EASE_INSINE, SensorDimmer::EASE_OUTSINE, SensorDimmer::EASE_INOUTSINE (default: EASE_LINEAR)
voidsetEasing(intvalue);
// [102] the duration of entire the transition in seconds (default: 1)
voidsetDuration(intvalue);
// [103] the duration of a single step of the transition in milliseconds (default: 100)
voidsetStepDuration(intvalue);
// fade the output from the current value to the target provided in the range 0-100
voidfadeTo(intvalue);
~~~
### Upload your sketch
### Upload your sketch
Upload your sketch to your arduino board as you are used to.
Upload your sketch to your arduino board as you are used to.
...
@@ -1350,6 +1364,7 @@ v1.6:
...
@@ -1350,6 +1364,7 @@ v1.6:
* Added support for PT100 high temperature sensor
* Added support for PT100 high temperature sensor
* Added support for MH-Z19 CO2 sensor
* Added support for MH-Z19 CO2 sensor
* Added buil-in rain and soil moisture analog sensors
* Added buil-in rain and soil moisture analog sensors
* Added support for generic dimmer sensor (PWM output)
* SensorRainGauge now supports sleep mode
* SensorRainGauge now supports sleep mode
* SensorSwitch now supports awake mode
* SensorSwitch now supports awake mode
* SensorLatchingRealy now handles automatically both on and off commands
* SensorLatchingRealy now handles automatically both on and off commands