Is GitHub Copilot Useful for Arduino Projects?

I am preparing for the GitHub Copilot certification exam using multiple resources, including Udemy, Coursera courses, GitHub questions, and Pass4Future GitHub Copilot questions.
During my preparation, I started wondering how useful Copilot really is for Arduino projects.

Can Copilot accurately understand the Arduino C or C++ syntax?
Does it give accurate code suggestions for functions like digitalWrite or analogRead?
Has anyone tried using Copilot inside VS Code with the Arduino extension?

I would like to know if Copilot can actually speed up sketch writing or if it creates more errors than it helps. Any experiences or advice from developers who have tried it?

I have seen ChatGPT and "AI" in general mentioned here a few times, but I don't think I have seen Co-pilot mentioned specifically.

The comments that are most often seen on here are from individuals who have asked AI to generate some code and it doesn't work or do what they wanted. They don't understand the code, so they come to the forum to ask how to fix it. The responses tend to be predictably cynical. AI is a tool like any other and can be used to offer suggestions, but ultimately the designer still needs to be able to understand the code and conduct their own testing to determine whether the generated code is consistent with their expectations and performs to their original specification.

AI can be useful and generate simple code examples, but a lot depends on how accurately the request is specified in the promt.

In answer to your questions:

No, AI does not "understand" anything. Its a machine that just follows a set of rules and is "trained" by being fed large volumes of data including examples found in the public domain. It can, however, generate accurate working code that can give that impression.

The question is a rather generalized and subjective. Its very much going to depend on how accurate the supplied prompt is. If I tell an AI to flash a LED on an off but don't give it a GPIO pin number, it will still generate some code based on its own "preference" (default LED pin is usually 13 and the code AI generated reflected that), but if I wanted the LED to be connected to pin 7, with an interval of 250ms and using non-blocking code, then the AI will also generate code with those parameters. On the other hand, AI is known to fail spectacularly sometimes!

I have used Vscode for programming Arduino related projects sometimes, but have never felt the need or desire to engage Co-pilot to assist me. I did however attempt to give it a try while replying to this question and was met with a request to log in with a Microsoft account so I didn't go any further. My comments here are therefore based on AI in general rather than Co-pilot specifically.

I am sure others will have different views!

Very likely, because the bot has been trained partly on code examples posted on this forum.

But who has to ask a chatbot to write a line of code like this and if so, does the result actually benefit them?

int value = analogRead(A4);

or this?

digitalWrite(relayPin, 1);

I completely agree with BitSeeker's comments above.

I wonder what the point of preparing and taking this exam is, especially for someone with no programming experience?
AI capabilities are changing every couple of weeks. If you take the exam today, all your knowledge will be outdated by Christmas.