I am new at this forum and a newbi with the XIAO and I apologize for my english. I come from germany.
I use a PCF8574 expansion board to control 8 LEDs. With a sample Code it works fine.
Then I tried to use my own code, where I sent light patterns, in the form of binary data like: B11101111 one after the other to the PCF8574.
No errors while compilation. But after sending to the XIAO it was dead!
Or at least unresponsive via USB.
Since I thought the whole thing was a stupid coincidence, I tried it again right away with another XIAO.
Bad idea! Reproducible the same course.
So now 2 XIAO dead!
I can not explain this. The code is really not that complicated.
Where is my failure? And how can I repair the XIAO?
Here is the code:
#include <Wire.h>
// address of PCF8574 IC on TWI bus #define IO_ADDR (0x20)
int val[6];
void setup() {
Wire.begin(); // initialize the I2C/TWI interface
Have you tried “double reset”? If you’re lucky, XIAO may reappear in Device Manager. If you’re unlucky, you may need to rewrite bootloader to bricked XIAO.
Searching the topic of ‘Products & Technology> XIAO’, you will find many of the same problems.
Now I have tried the double reset. And I am lucky. One of the XIAOs is alive again. The other one I have to try.
But the Problem with the code still exist. I see no reason why the XIAO can be shot down by such a simple code. It does not matter whether the PCF is connected or not.
1.For the original code, XIAO does not appear in Device Manager after uploading.
2.After “double reset”, XIAO will appear in Device Manager.
3.Next, check the XIAO port in the menu “Tool” “Serial port”.
4.I changed your code to int val [6]; ----> int val [7]; and uploaded it.
The upload was completed without XIAO disappearing from Device Manager.