Created
March 30, 2019 16:17
-
-
Save haveyouwantto/55d04baeac40e219e522897f722572b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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(){ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Help link libary WeELF328P