物聯網開發硬體應用
Would you like to react to this message? Create an account in a few clicks or log in to continue.
物聯網開發硬體應用

提升國內高職學生物聯網開發硬體應用入門技術 待進入科技大學再升級為物聯網開發硬體設計人員


您沒有登錄。 請登錄註冊

與樂創學習KT eduino結合學習

2 posters

向下  內容 [第1頁(共1頁)]

1與樂創學習KT eduino結合學習 Empty 與樂創學習KT eduino結合學習 周六 12月 02, 2017 2:44 pm

Admin


Admin

只要使用一條公對母杜邦線連接7697開發板第 3 腳與 JP22-1 即可
與樂創學習KT eduino結合學習 1210


#define LED 2 //3腳連接LED

void setup() {
pinMode(LED, OUTPUT); //將LED腳規畫為輸出埠
digitalWrite(LED, 1); //關閉LED,電路裡LED採低態動作
}

void loop() {
//慢慢變亮
analogWrite(LED, 200); //亮度約為20%
delay(200); //持續點亮0.2秒
analogWrite(LED, 150); //亮度約為40%
delay(200); //持續點亮0.2秒
analogWrite(LED, 100); //亮度約為60%
delay(200); //持續點亮0.2秒
analogWrite(LED, 50); //亮度約為80%
delay(200); //持續點亮0.2秒
analogWrite(LED, 0); //亮度約為100%
delay(2000); //持續點亮2秒
//慢慢變暗
analogWrite(LED, 50); //亮度約為80%
delay(200); //持續點亮0.2秒
analogWrite(LED, 100); //亮度約為60%
delay(200); //持續點亮0.2秒
analogWrite(LED, 150); //亮度約為40%
delay(200); //持續點亮0.2秒
analogWrite(LED, 200); //亮度約為20%
delay(200); //持續點亮0.2秒
analogWrite(LED, 255); //關閉
delay(1000); //持續關閉1秒
}

請將USB線連接Arduino Uno開發板與電腦的USB埠,進行編譯,完成編譯後
再完成燒錄後,觀察 DS10 LED 是否如預期,慢慢變亮、再慢慢變暗,循環執 行。

https://iotboard.666forum.com

2與樂創學習KT eduino結合學習 Empty 回復: 與樂創學習KT eduino結合學習 周日 12月 03, 2017 8:30 pm

Yn



兩板整合,讚!

https://yunlab.blogspot.com

回頂端  內容 [第1頁(共1頁)]

這個論壇的權限:
無法 在這個版面回復文章