2020年11月23日 星期一

❀week11

MAKER UNO

裝置管理員-到maker uno官網(下載CH341 Driver (Windows 10))

官網:https://www.cytron.io/p-maker-uno-simplifying-arduino-for-education












(聲音)

打開Arduino跟https://github.com/CytronTechnologies/MakerUno_Examples下載程式碼

可更改圖中標註的程式碼,讓聲音有變化















試玩時間~

程式碼:

#define Do 523

#define Re 587

#define Mi 659

#define Fa 698

#define So 784


int melody[] = {Do,Re,Mi,Do, Do,Re,Mi,Do, Mi,Fa,So};

void setup(){

  //put your setup code here,to run once:

  delay(1000);

  pinMode(8, OUTPUT);//8:Buzzer

  for (int i=0; i<11; i++) { //有11個符號要播放

    tone(8, melody[i], 100);

    delay(130);

  }

}

void loop(){

  

}
























沒有留言:

張貼留言