(Dec-27-2022, 10:56 PM)Yoriz Wrote: There is not enough information for anyone to be able to attempt to help.
Please show the code you have attempted so far in code tags and any errors in error tags.
Explain clearly what is meant to happen and what is actually currently happening.
There are links in my signature with help on how and what to post.
Hello,
I apologize, I was in a rush making this thread and I appreciate the feedback. Here is my code below, this is supposed to be in a class but I took out all of the junk you do not need to worry about.
int1 = 0
queue = []
def callback(characteristic, data):
global int1
int1 = data
async def retrieve():
async with BleakClient(arduino_ble, timeout=5.0) as client:
try:
await client.start_notify(char1, callback)
except Exception as e:
return
while queue.empty():
print(int1)
queue.pop()
client.stop_notify(char1)