#include <ArduboyExtra.h>
// include the extra modules you intent to use
#include "simple_buttons.h"
// create your arduboy object from the core lib
Arduboy arduboy;
// create a variable to hold buttons API
SimpleButtons buttons (arduboy);
// define our own nextFrame so we can inject other libraries that may
// need to poll or do things per frame
boolean nextFrame()
{
if (arduboy.nextFrame()) {
buttons.poll();
return true;
}
return false;
}
// example of using it in your actual sketch
void loop()
{
if (!nextFrame())
return;
if (buttons.pressed(LEFT_BUTTON)) {
// do cool stuff
}
}
-
Notifications
You must be signed in to change notification settings - Fork 1
Extra high level things for Arduboy development
License
joshgoebel/ArduboyExtra
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Extra high level things for Arduboy development
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published