Skip to content

Commit

Permalink
Update readData.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sachintiptur committed Jul 26, 2020
1 parent 2872305 commit 7cb36cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/tracker/readData.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import asyncio
import array
import json
from bleak import discover
from bleak import *

Expand All @@ -13,6 +14,8 @@

def uart_data_received(sender, data):
print(data.decode("utf-8"))
with open('activity.json', 'w') as json_file:
json.dump(data.decode("utf-8"), json_file)

#You can scan for devices with:
async def run1():
Expand Down

0 comments on commit 7cb36cf

Please sign in to comment.