|
@@ -6,7 +6,8 @@ from kivy.uix.label import Label
|
|
|
from kivy.uix.textinput import TextInput
|
|
|
from kivy.lang import Builder
|
|
|
import asyncio
|
|
|
-# from bleak import BleakClient,BleakScanner
|
|
|
+from bleak import BleakClient,BleakScanner
|
|
|
+import time
|
|
|
|
|
|
# import json
|
|
|
|
|
@@ -15,11 +16,14 @@ STM32_UUID = "00001101-0000-1000-8000-00805F9B34FB"
|
|
|
class InfoWidget(Widget):
|
|
|
# def __init__(self, **kwargs):
|
|
|
# super(InfoWidget, self).__init__(**kwargs)
|
|
|
-
|
|
|
|
|
|
async def discover_devices(self):
|
|
|
- self.size = (800,480)
|
|
|
- grid00 = GridLayout(cols=1,rows=2,width=self.width,height=self.height / 4)
|
|
|
+ # scanning = Label(text="Scanning...",font_size=100,top=self.top)
|
|
|
+ self.size = (1600,800)
|
|
|
+
|
|
|
+ devices = await BleakScanner.discover()
|
|
|
+ # self.remove_widget(scanning)
|
|
|
+ grid00 = GridLayout(cols=1,rows=2,width=self.width,height=self.height / 4,top=self.top)
|
|
|
grid00.top = self.top
|
|
|
self.add_widget(grid00)
|
|
|
grid01 = GridLayout(cols=2,rows=1,width=grid00.width,height=grid00.height / 2)
|