Should all examples in the Web Editor work?
Are they tested by the Arduino?
For examples I'm using Arduino Nano 33 BLE and want to make a BT Mouse.
The example LED under Arduino Nano 33 BLE works fine after following the tutorial. https://docs.arduino.cc/tutorials/nano-33-ble/bluetooth/
So I got the bluetooth working.
Now I want to use the example "moveAndScroll.ino" but that doesn't work. I can compile and upload it to Nano 33 BLE. Nothing shows up in the iOS app LightBlue or Bluetooth settings on Mac OS.
Is the code up to date or im doing something wrong?
Do you know any other examples for bluetooth mouse?
It would be nice if the Web Editor didn't show dead code. It's such a waste of time trying to get things working...
The list of library examples you find in Arduino Web Editor are from the Arduino Library Manager. In addition to the officially maintained libraries such as "ArduinoBLE", Arduino allows the community to distribute the 3rd party libraries via the Arduino Library Manager system. Over 6000 of these libraries have been submitted.
There is no way to automatically detect runtime problems with libraries and example sketches like the one you encountered. Even reliable automated detection of compile time faults would only be possible if all library authors set up some fairly complex infrastructure, which many do not have the technical competence to do without a significant amount of assistance.
And of course manually validating a list of tens of thousands of sketches for each of the targeted hardware platforms, and then revalidating each library's examples after each new release, is not feasible.
So the only way for Arduino to avoid listing non-functional examples would be to filter all the 3rd party libraries from the list. I'm not sure that would be of net benefit to the Arduino Cloud users and the community library developers.
Okey the ArduinoBLE is the library to trust.
That's good to know. By the way. Do you know any good examples of HID and specially mouse code based on ArduinoBLE? Extra plus if it works with Nano 33 BLE or Nano ESP32.