You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hub.handle(); should be called very often, about 1000Hz. Calling it every loop run would be best. The method is very light and does not use much cpu time.
Is there a recommended frequency to call hub.handle()?
That is, in
`
#include <Sport.h>
SportHub hub(SENSOR_ID, PIN);
#define INTERVAL = XXX
//...
unsigned long previous = 0;
void setup()
{//...
previous = millis();
//...
}
void loop(){
// calculate new values for sensor values
if (millis()-previous > INTERVAL) {
hub.handle();
previous = millis();
//...
}
`
what would be the minimum value for INTERVAL?
The text was updated successfully, but these errors were encountered: