bool gb.buttons.held( Button button , uint16_t time )
gb.buttons.held returns true once the button has been held for time amount of frames. It will not return true again until you release the button and hold it down again that long.
bool: true if the button has been hold down exactly time frames
#include <Gamebuino-Meta.h>void setup() { gb.begin(); }
void loop() { while(!gb.update()); // check if the A button was held down for 25 frames (one second) if (gb.buttons.held(BUTTON_A, 25)) { // handle it } }