I had this code working on an Arduino Nano and I tried to move it over to this MCU reading temperature on digital input 0. I purchased three of these and I just bricked two of them after attempting to download this sketch with Arduino IDE. The only thing I changed was the pin number for 2 to 0. Is there any way to recover so I can download another sketch or is it scrap metal. I thought I had mis-wired something so I tried downloading to a 2nd MCU so I’ve already lost 2 of 3 that I purchased. I was using Arduino IDE 2.2.1
You must be sure to select the Board type each and every time you upload, Sounds like it had the wrong board selected.
Simply unplug from computer USB, PRESS the BOOT button and hold it while plugging the USB back in. You should hear the windows device connected DONG and be ready to go again if not Press the RESET button and Select the Appropriate com port and try the download again. It may take a few tries.
That is an issue I’ve had with the Seeeed Xiao ESP32-C3. Way too much falderall between compiles (button pushing / re-selecting device/ etc). Never an issue with the original Seeed Xiao or any other micro-controller in the dozen or so different types I’ve used over the years, including a few different versions of ESP32’s. Something is not as right at is could/should be in that area. Two recent project started out with a Seeeed Xiao ESP32-C3 but ended up with a different micro-controller due to this unwelcome situation. Any real life development / debug cycle, especially without a decent debugger, WILL result in many many compiles & reloads. The above mentioned issues just cannot be tolerated.
Yes I prototype with the XIAO SAMD21 and XIAO Expansion Board
with WIFI enabled Boards, consider Arduino OTA update
and installing a heartbeat or end(0); end program execution command
you can set it on a timer, lets say 5 minutes after you start the test program the program will automaticly drop out of execution
this will sometime allow you to get the attention of the processor and it will allow an upload
Yes, I feel your Pain. (I don’t know looks like a sales pitch) I can say after using ALL of the SEEED mcu’s , If you botch the Initial selection in the IDE , or in the case of the ESP32C3 (probably the most sensitive) if You give it bad code resulting in a BOOT LOOP a reload will be hit or miss without the button shenanigans. I usually only have to press the buttons for the initial Upload Waiting prompt in the case of the ESP32C3, The Nrf52 Xiao’s don’t have that issue , UNLESS you switch from Non-embed to or from Embed BSP’s. YMMV
Bottom line is, for me It’s 99% an issue between the keyboard and the Floor.
My opinion is the Arduino IDE is not SEEED friendly. PlatformIO is much better and the debugger works.
PS> I even developed a RESET button cover for the NRF’s after my initial foray.i.e don’t use a scalpel
Well, if it is self induced, I don’t have that issue with any other micro-controllers. As for PlatformIO, I’ve used it, it has it’s own set of issues and I no longer use it. I spent a career developing software & used many platforms both HW & SW so I have a pretty good idea what is and isn’t up to snuff. When tools or platforms get excessively in the way I go to others when I can. I have no problem using either a scalpel or a sledge hammer when it’s appropriate.