I just thought, you were using the ui flow firmware previously right. I think there is an issue if you have flashed one of the micropython firmwares and try to use arduino afterwards without completely wiping the memory. Please try to use the erase tool in the M5 burner tool and then try and flash an arduino sketch again