Access the magnetometer sensor

Hello, I am working on a project to display and test the phone’s sensors (accelerometer, gyroscope etc) by using p5.js. I can’t find any information to access the magnetometer sensor, is there something implemented in P5js ?

Thanks in advance :slight_smile:

Some browsers on some OSes are able to access magnetometer (via Javascript) and some not. It also depends on web server configuration. Here are some useful notes:

Hi, thank you for the response I will try with that method :slight_smile: