Previously the magnetic field measured with analogRead. Due to poor performance of over 100 μs this must be changed to digitalRead. This change is not tested so far.
|
return digitalRead(this->hall_pin) == LOW; |
If digitalRead works fine, we should change it to FastGPIO::Pin<THE_HALL_PIN>::isInputLow().
This change will increase the performance from 5.1 μs to 0.125 μs.
After that change the clock communication should be more stable, and we can increase the frequency even more.