Activity 3 Robot Sound
unknown
c_cpp
7 months ago
558 B
1
Indexable
Never
void setup() { // put your setup code here, to run once: pinMode(13,OUTPUT); //set pin 13 to output for(int i=0; i<3; i++){ //loop 3 times tone(13,100); //play 100 frequency pitched tone for .5 seconds delay(500); noTone(13); //turn off tone(13,300); //play 300 frequency pitched tone for .5 seconds delay(500); noTone(13); //turn off tone(13,100); //play 100 frequency tone for .5 seconds delay(500); noTone(13); //turn off delay(500);} //wait .5 seconds and repeat } void loop() { // put your main code here, to run repeatedly: }
Leave a Comment