import os, sys, io
import M5
from M5 import *
n = None
# Describe this function...
def factorial(n):
if n == 0:
return 1
return n * factorial(n - 1)
def setup():
global n
M5.begin()
print(factorial(4))
def loop():
global n
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")