Active Topics

 


Reply
Thread Tools
Posts: 29 | Thanked: 7 times | Joined on Dec 2007 @ Greater Boston
#1
I did a quick search and didn't see anything useful. Anyone know how to light the LEDs from Python?

Thanks!
 
Posts: 86 | Thanked: 362 times | Joined on Dec 2007 @ Paris / France
#2
Here is a small example (blinks the led for 10 seconds) :

Code:
#! /usr/bin/python

import time
import dbus
bus = dbus.SystemBus()
obj = bus.get_object('com.nokia.mce','/com/nokia/mce/request')
iface = dbus.Interface(obj,dbus_interface='com.nokia.mce.request')
led_pattern = 'PatternCommonNotification'

# led on
iface.req_led_pattern_activate(led_pattern)

# wait 10s
time.sleep(10)

# led off
iface.req_led_pattern_deactivate(led_pattern)
You can find other patterns in /etc/mce/mce.ini

Eric
 

The Following 9 Users Say Thank You to eber42 For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 08:00.