Skip to content

Instantly share code, notes, and snippets.

@haratta27
Created August 10, 2020 02:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haratta27/4b5f6ec5f4f0153da2011de417cc22ef to your computer and use it in GitHub Desktop.
Save haratta27/4b5f6ec5f4f0153da2011de417cc22ef to your computer and use it in GitHub Desktop.
#include <M5Stack.h>
#include "SimpleBeep.h"
void setup(void){
M5.begin();
sb.init();
}
void loop(void){
M5.update();
if(M5.BtnA.wasPressed()){
sb.beep(5,C4,100);
}
if(M5.BtnB.wasPressed()){
sb.beep(5,D4,100);
}
if(M5.BtnC.wasPressed()){
sb.beep(5,E4,100);
}
delay(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment