Browse Source

clap1

master
Slayr 1 year ago
parent
commit
c03370bb8c
1 changed files with 26 additions and 0 deletions
  1. 26
    0
      sketches/my_sk_sandra/clap1.ino

+ 26
- 0
sketches/my_sk_sandra/clap1.ino View File

@@ -0,0 +1,26 @@
1
+void setup() {
2
+  // put your setup code here, to run once:
3
+  Serial.begin(9600);
4
+  
5
+
6
+}
7
+
8
+void loop() {
9
+  // put your main code here, to run repeatedly:
10
+  char pat[]  = "xxx xx x xx ";
11
+  Serial.println("STARTOF PROGRAM");
12
+  int i = 0;
13
+  while (i<12) {
14
+    // do something (with i)
15
+    if (pat[i] == 'x') {
16
+       tone(11, 440, 40);
17
+       delay(40);
18
+       tone(11, 220, 40);
19
+       
20
+    }
21
+    Serial.println(pat[i]);
22
+    i++;
23
+    delay(150);
24
+  }
25
+  Serial.println("END OF PROGRAM");
26
+}

Loading…
Cancel
Save