Skip to content

Instantly share code, notes, and snippets.

@remisarrailh
Created May 11, 2019 23:23
Show Gist options
  • Save remisarrailh/ba3b5e9446ecc6b55c170be05940984e to your computer and use it in GitHub Desktop.
Save remisarrailh/ba3b5e9446ecc6b55c170be05940984e to your computer and use it in GitHub Desktop.
#include <AsyncDelay.h>
const int FPS = 1000 / 30; //30 FPS
AsyncDelay tick; void setup(){
tick.start(FPS, AsyncDelay::MILLIS);
}
void loop(){
if(tick.isExpired()){
//ANIMATION ICI
tick.repeat();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment