mirror of https://github.com/arendst/Tasmota.git
Updated ADC (markdown)
parent
cab84cd6cd
commit
0fd4d4e4da
4
ADC.md
4
ADC.md
|
@ -1,11 +1,11 @@
|
|||
ESP chips have one ADC pin that can read analog signals. When referring to the ADC pin these terms are used interchangeably: ADC (Analog-to-digital Converter), TOUT, Pin6, A0 or Analog Pin 0.
|
||||
|
||||
By default Tasmota allows the ADC pin to be used as an external input and assigned to a component. The signal can be interpreted as Lux, Temperature, a Button or a "generic" analog voltage signal.
|
||||
By default Tasmota allows the ADC pin to be used as an external input and assigned to a component. The signal can be interpreted as temperature, lux, potentiometer, button or "generic" voltage signal.
|
||||
|
||||
The reading will show in web UI's sensor section as "Analog0 %value%" and published in `tele/%topic%/SENSOR` JSON response as `"ANALOG":{"A0":%value%}`. The pin has a 10-bit resolution, which means _%value%_ can be between `0` and `1024`.
|
||||
|
||||
### Rule triggers
|
||||
To use ADC in rules use these triggers:
|
||||
Use these triggers in rules:
|
||||
|
||||
`on ANALOG#A0div10 do ...` - when the A0 input changes by more than 1% it provides a value between 0 and 100
|
||||
|
||||
|
|
Loading…
Reference in New Issue