LE.# 機器人專題課程 ## 01.閃燈 (9/26) ### 程式碼 ```javascript= void setup() { pinMode( D4 , OUTPUT); } void loop() { digitalWrite(D4 , HIGH); delay( 1000 ); digitalWrite(D4 , LOW); delay( 1000 ); } ```  ### 實作  --- ## **02. 蜂鳴器** (10/3) ### 程式碼 ```javascript= void setup() { } void loop() { tone(D8, 440); delay( 1000 ); noTone(D8); delay( 1000 ); } ``` [蜂鳴器](https://https://drive.google.com/file/d/19B7-vrmDmciLu2cIotsqAtEdoLjm5tjX/view?usp=sharing)  ### 實作  --- ## **03. 超音波感測器** (10/24) ### 程式碼 ```javascript= #include <Ultrasonic2.h> int Range = 0 ; Ultrasonic2 monUltrasonic_pinD5(D5); void setup() { Serial.begin(9600); } void loop() { Range = monUltrasonic_pinD5.mesurer(D5) ; Serial.print("message"); Serial.print(Range); Serial.print(" "); Serial.println(); delay( 200 );
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up