How can I reduce false positives in vibration anomaly detection on an AVR128DA48?

I'm still on the project tho where I've installed a vibration sensor to monitor industrial machinery using an AVR128DA48 microcontroller. While my basic anomaly detection code is functioning,

if (vibration_data > threshold) {
    alert();
}

it tends to produce too many false positives. Given the limitations of the microcontroller, I'm looking for a more refined algorithm to improve the accuracy of detecting anomalies in the vibration data. Any suggestions on how to enhance my approach?
Was this page helpful?