From 3755f26081cd2f04274112d884e0cf417cbfdfdc Mon Sep 17 00:00:00 2001 From: sqozz Date: Fri, 8 May 2020 20:14:55 +0200 Subject: [PATCH] Add function to set LED visibility --- sem6000.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sem6000.py b/sem6000.py index 9b7366e..be93af5 100644 --- a/sem6000.py +++ b/sem6000.py @@ -113,6 +113,14 @@ class SEMSocket(): success = msg.send() return success + def enableLED(self, status): + cmd = bytearray([0x0f]) + payload = bytearray([0x00, 0x05, status, 0x00, 0x00, 0x00, 0x00]) + msg = self.BTLEMessage(self, cmd, payload) + + success = msg.send() + return success + @property def name(self): self._name = self._name_char.read().decode("UTF-8")