While troubleshooting code wio terminal stops accepting uploads

Hi,

been testing code with wio-terminal attached to my laptop running linux.
Changed some code (as I do all the time) and after compiling the uploading does not work anymore. I probably uploaded an ino file that has a logical error or something.

What is the recommended way to troubleshoot / to get access to the wio again?
I probably just need to erase the last uploaded ino file, but how?

solved it, isnt that nice.

reset wio terminal while attached to computer, when a new connection is made and seen in arduino ide reload ino into wio terminal. After three times it worked.
reset like this:
’

  1. turn wio terminal off first
  2. after that turn on and reset right away
  3. when the port comes back as connected in arduino ide, upload code
    ’

but this code crashed the wio-terminal. Anyone know why?
Of course sen55 sensor is attached via i2c

’
// this seemd to have bricked my wio terminal ??
void printSerialNumber() {
uint16_t error;
char errorMessage[256];
unsigned char serialNumber[32];
uint8_t serialNumberSize = 32;

error = sen5x.getSerialNumber(serialNumber, serialNumberSize);
if (error) {
    Serial.print("Error trying to execute getSerialNumber(): ");
    errorToString(error, errorMessage, 256);
    Serial.println(errorMessage);
} else {
    Serial.print("SerialNumber:");
    Serial.println((char*)serialNumber);
}

}

’