Skip to content
Snippets Groups Projects
Commit e93b91e0 authored by Muhamad Irfan Maulana's avatar Muhamad Irfan Maulana
Browse files

add test connection

parent 53a0e5a1
Branches
No related merge requests found
import serial, struct, time, urllib.request, json
with urllib.request.urlopen("http://localhost/api-greentyno/getStatus.php?id=1") as url:
data = json.loads(url.read().decode())
print(data)
year = data['year']
print(year)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment