@user111620 you'll need to update your Bangle.js firmware to the latest version to have it reliable.
Right now we use just the magnetometer X and Y values for the angle. If you don't hold it level then like a real compass it'll read differently.
I guess you can't easily just add the Z value in, so I guess as you say I think you'd have to:
dy
mag.dy*accel.z + mag.dz*accel.y
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@user111620 you'll need to update your Bangle.js firmware to the latest version to have it reliable.
Right now we use just the magnetometer X and Y values for the angle. If you don't hold it level then like a real compass it'll read differently.
I guess you can't easily just add the Z value in, so I guess as you say I think you'd have to:
dy
based on something likemag.dy*accel.z + mag.dz*accel.y
(may not be exactly that, but that's the idea)