Use m5go from mac

2024-07-10

I was trying to use UI Flow fpr M5GO by following the articles below.

import os, sys, io
import M5
from M5 import *
from hardware import *
import requests

def btnC_wasClicked_event(state):
  Speaker.tone(2000, 50)
  # Need to rewrite with the actial IP address
  requests.get("http://172.20.10.7:3000/pages/play") 

def setup():
  M5.begin()
  Widgets.fillScreen(0x222222)

  BtnC.setCallback(type=BtnC.CB_TYPE.WAS_CLICKED, cb=btnC_wasClicked_event)

def loop():
  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")

Successfully, able to run the test code on the device. However, never be able to download(burn) the script on the device...