import os, sys, io
import M5
from M5 import *
import json
person = None
def setup():
global person
M5.begin()
person = json.loads('{"age":22, "name":"ivan"}')
print(person)
print(json.dumps(person))
def loop():
global person
M5.update()
if __name__ == '__main__':
try:
setup()
while True:
loop()
except (Exception, KeyboardInterrupt) as e:
try:
from utility import print_error_msg
print_error_msg(e)
except ImportError:
print("please update to latest firmware")