/Android-LED-Control

Control flashlight, Notification LED and other LED lights. Using Python on Android.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Android LED-Controler [Python]

About:

It was made as simple and clear as possible without superfluous. So that everyone can understand how it works!

Example code to enable and disable phone flashlight:

import os

def flashlight_on():
    os.popen("echo 0 > /sys/class/leds/flashlight/brightness")
    os.popen("echo 255 > /sys/class/leds/flashlight/brightness")

def flashlight_off():
    os.popen("echo 0 > /sys/class/leds/flashlight/brightness")
    

DEMO:

disco

Default method required ROOT