Papermind

Tone&noTone

Mar 19th, 2018
6,771
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. /* tone() & noTone()
  2. Created March – 2018
  3. By. papermindvention.blogspot.com
  4. */
  5. int buzz1 = 6;
  6. int buzz2 = 7;
  7. void setup(){
  8. pinMode (buzz1, OUTPUT);
  9. pinMode(buzz2, OUTPUT);
  10. }
  11. void loop(){
  12. noTone(buzz2);
  13. tone (buzz1, 980);
  14. delay (100);
  15. noTone(buzz1);
  16. tone(buzz2, 880);
  17. delay(100);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment