Skip to content
Snippets Groups Projects
Verified Commit 0110db6d authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Implement sending of data

parent fdb38a7b
No related branches found
No related tags found
No related merge requests found
Pipeline #76964 failed
......@@ -63,3 +63,9 @@ class MynitBluetooth(BluetoothDispatcher):
Logger.info("Data received")
data = characteristic.getStringValue(0)
self._app.handle_data(data)
def send_data(self, data):
if isinstance(data, str):
data = data.encode("utf-8")
self.write_characteristic(self._characterisitcs[0], data)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment