awesome
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

clap1.ino 483B

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