Added connect method
This commit is contained in:
parent
22ef3b4da7
commit
cce4e30c60
15
droid.py
15
droid.py
|
@ -1,3 +1,16 @@
|
|||
import asyncio
|
||||
from time import sleep
|
||||
from bleak import BleakScanner, BleakClient
|
||||
class droid():
|
||||
def __init__(self, ipAdress):
|
||||
self.ipAdress = ipAdress
|
||||
print("initizing")
|
||||
self.ipAdress = ipAdress
|
||||
self.connection = asyncio.run(self.connect())
|
||||
async def connect(self):
|
||||
print("connecting")
|
||||
async with BleakClient(self.ipAdress) as droid:
|
||||
await droid.write_gatt_char(0x000d, 222001)
|
||||
await droid.write_gatt_char(0x000d, 222001)
|
||||
|
||||
|
||||
arms = droid("D4:D7:12:C5:93:C1")
|
Loading…
Reference in New Issue
Block a user