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的板播放音樂
沒有留言:
張貼留言