From c70d8dc8137ff40efba484a75927a77ebf1e5c15 Mon Sep 17 00:00:00 2001 From: Gerardo Marx Date: Tue, 13 Apr 2021 12:35:40 +0000 Subject: [PATCH] initial commit --- pyLED.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pyLED.py diff --git a/pyLED.py b/pyLED.py new file mode 100644 index 0000000..07fd0e5 --- /dev/null +++ b/pyLED.py @@ -0,0 +1,16 @@ +#!/usr/bin/python +import sys +LED3_PATH = "/sys/class/leds/beaglebone:green:usr3" + +def write2LED(fileName, value, path=LED3_PATH): + """This function writes the passed value to the file in the path""" + fo = open(path + filename,"w") + fo.write(value) + fo.close() + return + +def removeTrigger(): + write2LED("/trigger", "none") + return + +print("Starting the LED Python Script")