BluetoothLE Examples of various platfoms
This example shows how use an Arduino MKR WiFi 1010 to make a Bluetooth LE peripheral that offers an accelerometer service. It uses the ArduinoBLE library.
You will need to upgrade your MKR 1010 to firmware version 1.2.0, using the Firmware updater tool in the Arduino IDE. Here are instructions to upgrade the firmware of the MKR 1010. This was built using an ADXL337 accelerometer was used for this example because it is simple; Any of the ADXL accelerometers can be substituted (the drawing shows an ADXL335). This family of accelerometers has three analog voltage outputs for the three axes.
Accelerometer connected to MKR board, Schematic view:
Accelerometer connected to MKR board, Breadboard view:
You can use this with this p5.js Web Bluetooth example.