This website works better with JavaScript.
Home
Explore
lain.church
Help
Register
Sign In
lunarised
/
inoProjects
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Buzzer and Mode Switch working
master
James McKenzie
5 years ago
parent
cfef9bbf8a
commit
81fc75702e
1 changed files
with
24 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+24
-0
Theremin/Theremin.ino
+ 24
- 0
Theremin/Theremin.ino
View File
@@ -0,0 +1,24 @@
/*
*@author James McKenzie
*@lang C89 Based
*@contact lunarised@outlook.com
*/
int mode;
void setup() {
pinMode(0, INPUT_PULLUP);
pinMode (13, OUTPUT);
pinMode(8, OUTPUT);
if (digitalRead(0) ==HIGH){
mode = 0;
}
else{
mode = 1;
}
}
void loop() {
if (mode == 0){
digitalWrite(13, HIGH);
tone(8, 440);cd
}
}
Write
Preview
Loading…
Cancel
Save