I'm working on a project with my micro:bit to measure soil moisture levels. The plan is to calibrate the sensor by measuring dry soil with button A (which I do by holding the sensor in the air) and wet soil with button B (by dipping it in water). After I get these dry and wet values, the code starts sending data to my computer. However, when I place the sensor in the ground, it usually reads either 0 or 100, and sometimes it briefly shows a different value before it goes back. I'm wondering why I'm not getting accurate moisture readings from the soil.
1 Answer
Check if the raw value is fluctuating between your wet and dry values too. It might help diagnose the issue. Sometimes, the sensor readings can be unstable due to environmental factors.

I haven't looked at just the raw value yet. I thought calibrating was the best approach to get reliable readings. When I tested it during calibration, the raw values were around 300 for dry and 700 for wet.