Skip to content

Instantly share code, notes, and snippets.

@haveyouwantto
Created March 30, 2019 16:17
Show Gist options
  • Save haveyouwantto/55d04baeac40e219e522897f722572b4 to your computer and use it in GitHub Desktop.
Save haveyouwantto/55d04baeac40e219e522897f722572b4 to your computer and use it in GitHub Desktop.
#include <WeELF328P.h>
WeBuzzer buzzer(OnBoard_Buzzer);
void setup(){
pinMode(2, INPUT);
}
void loop(){
if(!digitalRead(2)){
//your code here
}
_delay(1);
_loop();
}
void _delay(float seconds){
long endTime = millis() + seconds * 1000;
while(millis() < endTime)_loop();
}
void play(int freq){
buzzer.tone(freq,240);
}
void _loop(){
}
@bumjanda0123
Copy link

Help link libary WeELF328P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment