Microcontroller and sensor: Arduino Nano BLE with IMU
https://editor.p5js.org/Siming2024/sketches/MTHMDxFGI
https://editor.p5js.org/ehagan/sketches/05eay9RaG
https://www.youtube.com/watch?v=yahxL_yAx18

https://www.youtube.com/watch?v=4eYr-orX1Wk
2D Code:
javascript
Copy code
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
ellipse(200, 200, 50, 50);
}
Converted to 3D Code:
javascript
Copy code
function setup() {
createCanvas(400, 400, WEBGL);
}
function draw() {
background(220);
sphere(25); // Radius is half the diameter
}