Open ensonic opened 9 years ago
You have to set trigger
to timer
in order to create the delay_on
and delay_off
attributes in sysfs. This has some unfortunate side effects. See https://github.com/ev3dev/ev3dev/issues/225 for more information.
My advice would be to implement your own blinking function rather than relying on the timer
trigger.
@dlech Is https://github.com/ev3dev/ev3dev/wiki/Using-the-LEDs out of date? It still has delay_on/off
The leds class is part of the mainline linux kernel, so it has not changed and is not likely to. You can use the timer
trigger. I just don't recommend it because of permissions and race condition issues with the dynamic sysfs attributes (delay_on
/delay_off
).
I suppose we should add a link to the issue I mentioned above to that page though.
The code in https://github.com/topikachu/python-ev3/blob/master/ev3/ev3dev.py#L464-465 exposes delay_on/off properties for the timing. Allthough: