Files
ESPEasy/docs/source/Plugin/P097_events.repl
T
Gijs Noorlander bede949bef [docs] Replace code-block:: html with code-block:: none
The HTML parser does not parse our own rules which is where it is used.
So until we have a rules highlighter, we use the ``none`` highlighter.
2020-08-04 13:18:36 +02:00

42 lines
1016 B
Plaintext

.. csv-table::
:header: "Event", "Example"
:widths: 30, 20
"
``<taskname>#<taskvar>``
The regular events like in every other task. Only difference here is that you may have an event either when the touch pad is touched, released or both.
","
.. code-block:: none
on touch#Touch do
GPIO,2,1 //LED on
endon
"
"
``<taskname>#Duration=``
When enabled, this event will be sent on release of the touch pad. The event variable is the time in msec the pad had been touched.
","
.. code-block:: none
on touch#Duration do
LogEntry,'Touch Duration %eventvalue% ms'
endon
Example in the log:
.. code-block:: none
6553261 : Info : Touch : ADC2 ch5 (T5): 10
6553338 : Info : EVENT: touch#Touch=10.00
6553638 : Info : EVENT: touch#Duration=460
6553653 : Info : ACT : LogEntry,'Touch Duration 460 ms'
6553654 : Info : Command: LogEntry
6553655 : Info : Touch Duration 460 ms
"