Open
Description
Example ex00_Acceleration_Ball_Bounce used to work in 2018 but doesn't now. I tried it on 2 phones today. (Android 6.0.1, Android 10). I made a small program just showing the AccelerationX,Y,Z values - always zero. I guess the code hasn't changed so the problem is security on the phone. I've tried giving Chrome all the permissions available - no better. ex03_Shake_Ball_Bounce the same.
This was a great feature, I've seen 20 10-year-olds all shake their phones with this and laugh. Shame it doesn't work now.
function setup() {
createCanvas(displayWidth, displayHeight);
fill(0);}
function draw() {
background(255);
textSize(36);
textAlign(RIGHT);
text(frameCount , 250, 40);
text(accelerationX, 250, 80);
text(accelerationY, 250, 110);
text(accelerationZ, 250, 140);}