int8_t gb.sound.tone( uint32_t frequency [, int32_t duration = 0] )
gb.sound.tone plays a tone of a certain frequency for duration milliseconds. If duration is zero then it'll play indefinitally. It returns the track identifier or -1 on failure
int8_t: track identifier or -1 on failure
#include <Gamebuino-Meta.h>void setup() { gb.begin(); }
void loop() { while(!gb.update()); if (gb.buttons.pressed(BUTTON_A)) { // let's play a tone with a frequency of 220Hz for one second! gb.sound.tone(220, 1000); } }