I'm having USB communication issues between XIAO SAMD21 and a VS Forms app

As mentioned, there are a few things I’d change but I’m not sure this is the correct place to make corrections to your code’s functionality?

The USB<->SAMD21 communications is essentially “solved”, the correct structure and operation of your code is probably best left for another topic or forum entirely.

You could just ask ChatGPT or Claude to generate the code for you. If you need this for a project without the use of AI then you’re on your own :slight_smile:

I haven’t been impressed with AI, writing code, they seem to make as many mistakes as i do, but they do it faster and change so much at one time, you don’t know where the issue is.

Thanks for your help getting me this far

I hear you!

AI is fast but can be messy for sure. Just need to be careful with generated code.

I generally don’t use AI for my project coding (deep embedded for customers), but I’ve been told to “embrace the 21st century!!!” by members of this forum, so I have started using Claude more often for documentation and simple functions.

If you get stuck, send me a message and I can have another look at your new code. Enjoy your weekend :slight_smile:

Final Update: It’s working! I reverted my app back a couple steps to a restore point in VS. Then focused used Chat GBT to review my sketch. It was actually a good learning experience. It gave me a list of like 7 or 8 things that it found, explained the reason it was an issue and the suggested fix. I then manually fixed each item in my sketch. Everything worked at that point except the X close button in the app. I went back to Co-pilot and it fixed that. I have tested it with the local buttons and the app buttons and everything works as expected.
Thanks again for your help and suggestions.

3 Likes

Thanks for all your information… I am sure it will help people in the future!

1 Like

It is like you’ve narrowed it down nicely! For anyone working on smooth device communication and testing, platforms like 92 glory also show how reliable and seamless performance makes troubleshooting much easier.

1 Like