Sensing wheel position with the accelerometer

This reminds me … would it be possible to measure rotation speed, or even just calibrate position, by connecting a Hall effect sensor to a GPIO pin? Would it be like a capacitance button or just an input? I guess if my Pico was on the wheel, I would put the magnet on the frame and the Hall sensor on a spoke.

I was thinking this would be a good combination with the gyro code here. How close do I have to get the 6-axis accelerometer to the wheel axle for the gyro values to be useful?