Week11
1.
讓Maker Uno的燈依序亮起
void setup() {
// put your setup code here, to run once:
for(int i=2;i<=13;i++){
pinMode(i,OUTPUT);
}
}
void loop() {
// put your main code here, to run repeatedly:
for(int i=2;i<=13;i++){
digitalWrite(i,HIGH);
delay(300);//not recommend delay in for loop
}
for(int i=2;i<=13;i++){
digitalWrite(i,LOW);
}
}
2.
讓音樂響起來
到下列的網址
https://makeruno.com.my/changing-melody-with-push-button-using-only-maker-uno/?fbclid=IwAR1inzhRhtNH-teALIYbmbU4lsdJFrV2b1L7VDlRYIcnKw-RzBdaj3jzkmo
先用裡面的程式,讓Maker Uno的版跑起音樂~
3.
換聖誕節的音樂
到下列網址
https://makeruno.com.my/changing-melody-with-push-button-using-only-maker-uno/?fbclid=IwAR1inzhRhtNH-teALIYbmbU4lsdJFrV2b1L7VDlRYIcnKw-RzBdaj3jzkmo
注意:
在一開始音樂快結束前,持續按Button才能換音樂
4.
卡歌~
反白那一行可以卡歌
if( digitalRead(button) == LOW) break;





沒有留言:
張貼留言