A magnetometer senses a magnetic field, so in order to sense water you'd have to maybe have something like a float with a magnet on it.
But yes you can do that and in fact I did do that as an example in a talk I did once.
Another option is if you have a float attached to a lever, you can put the Puck on that lever and use the accelerometer to measure the angle of the lever.
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.
A magnetometer senses a magnetic field, so in order to sense water you'd have to maybe have something like a float with a magnet on it.
But yes you can do that and in fact I did do that as an example in a talk I did once.
Another option is if you have a float attached to a lever, you can put the Puck on that lever and use the accelerometer to measure the angle of the lever.