互動技術概論
week11
課程內容:
(一)期中作品展示
(二)Maker Uno介紹
(三)音符播放實作
(二)Maker Uno介紹
# 使用工具Maker Uno
Maker Uno官網: https://makeruno.com.my/
安裝驅動程式檔:https://makeruno.com.my/getting-started/
(三)音符播放實作
#define Do 523
#define Re 587
#define Mi 659
#define Fa 698
#define So 784
#define La 880
#define Si 988
#define DO 1046
#define RE 1175
#define MI 1318
int melody[]={Si,Si,DO,RE,RE,DO,Si,La,So,So,La,Si,Si,La,La};
void setup() {
// put your setup code here, to run once:
delay(1000);
pinMode(8, OUTPUT);
for(int i=0;i<sizeof(melody)/2;i++){
tone(8,melody[i],100);
delay(200);
}
}
void loop() {
// put your main code here, to run repeatedly:
}


沒有留言:
張貼留言