Probabilistic reasoning on microcontrollers for robust embedded AI sensing