packageIrq
Interrupts and timers: machine.Pin.irq() and machine.Timer
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Contents
| Name | Description |
|---|---|
| GP1 driven by a square wave (rising and falling edges); the script registers machine.Pin.irq() with trigger=IRQ_RISING on GP1, which toggles GP0 (LED) from the callback - proves the filtering by edge direction | |
| GP0 drives an LED toggled by a periodic machine.Timer (500 ms) while the main script sleeps once, for a long time - proves that the Timer keeps firing without making this sleep() return early |