-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
Describe the bug.
The PWM feature in outputs something only on first run after boot. If you exit a script and run again, there will be no PWM output signal.
Reproduction
- Switch on or reboot
- Run
gpio.js
from examples, or the following script:const eventLoop = require("@flipperdevices/fz-sdk/event_loop"); const gpio = require("@flipperdevices/fz-sdk/gpio"); let led2 = gpio.get("pa7"); // same as `gpio.get(2)` print("Commencing PWM (PA7)"); eventLoop.subscribe(eventLoop.timer("periodic", 10), function (_, _item, led2, state) { led2.pwmWrite(1000, state); return [led2, (state + 1) % 101]; }, led2, 0); eventLoop.run();
- Exit the script (Ctrl+C in
fz-sdk
orback
button if started on flipper) - Run it once again
- Notice the silence on PA7 pin
Anything else?
@portasynthinca3
still an issue in the current release version