The {{fname|setup()}} call is used to specify a setup method (optional) and a loop method to be called.
+
The {{fname|setup()}} call is used to specify a ''setup'' method (optional) and a ''loop'' method to be called.
−
The '''setup''' parameter can be used to specify some initialization routine. It is quite useful to declare additional sensor, additional components for your project.
+
The optional ''setup'' method is called to specify some initialization routine. It is quite useful to declare additional sensor, additional components for your project.
−
Once {{fname|din.run()}} is called, the {{fname|async def loop( din )}} is continuously executed! That execution can even be monitored with a watchdog. The {{fname|din}} parameter offers an access to all the behaviors and features of the DIN case.
+
Once {{fname|din.run()}} is called:
+
* the {{fname|def setup( din )}} is called once (if any)
+
* the {{fname|async def loop( din )}} is continuously executed!
−
The {{fname|din.run()}} exits on:
+
The ''loop'' execution can even be monitored with a watchdog.
−
* loop() exception
+
+
The {{fname|din}} parameter passed to ''setup'' and ''loop'' method provide a full access to all the behaviors and features of the DIN case.
+
+
In normal condition, the {{fname|din.run()}} never exits. However, exit can happens: