| Ligne 123 : |
Ligne 123 : |
| | </syntaxhighlight> | | </syntaxhighlight> |
| | | | |
| − | Example with tasks creation is available on the [ micropython-mydin] repository. | + | Example with tasks creation is available on the [https://github.com/mchobby/micropython-mydin micropython-mydin] repository. |
| | + | |
| | + | ==== setup_watchdog() ==== |
| | + | |
| | + | Abstract method that must be overrided in descendant class to activates the hardware Watchdog of the microcontroler. 2 seconds (2000 ms) may represent a good timing. |
| | + | |
| | + | Once activated, the feed_watchdog() must be called before the timeout occurs otherwise the microcontroler will reset. |
| | + | |
| | + | Remarks: the watchdog is automatically feeded at every iteration of the ''userloop''. |
| | + | |
| | + | <syntaxhighlight lang="python"> |
| | + | def setup_watchdog( self, time_ms ): |
| | + | </syntaxhighlight> |
| | + | |
| | + | * '''time_ms''' : timeout of the watchdog before resetting occurs. |