Page 17 - IoT物聯網應用-使用ESP32開發版與ArduinoC程式語言
P. 17
認識物聯網與 Arduino 1
1-3 ESP32 腳位編號及用途
NodeMCU-32s ᒱ್Ϟ 36 ࣬໔ЗdШʔ݊ӊɓࡈ໔Зޫ̙จԴ͜dԷν GPIO 6-11
᙮ደό͜dʔܔᙄᛘ٫Ꮄ፯͜d˸ɨႭ ESP32 ٙ໔Зʿ͜f
ESP32 ໔Зᇜྡʕdΐ̈༰މतйٙʱආБႭd࿁ڋኪ٫ϾԊϞεਖ਼
ϞΤ൚dޫίܝᚃሙʕᚃʧୗdᛘ٫සɽߧə༆dܙܝᚃሙуึ༉ႭՉ
จ່f
1. GPIO 6-11(淺灰色):ӻ୕ደ Flash ͜dʔܔᙄᛘ٫Դ͜f
2. GPIO 0,2,4,12-15,25,26,27,32-36,39(粉紅色):Υࠇ 16 ଡ଼dவԬ໔З̙͜
ᅰЗאᗳˢชdADC ݊ Analog to Digital ConverterᅰЗᗳˢᔷ౬ኜď
ঐ̙݊Ъމᗳˢชdၾෂ୕ UNO א ESP8266 ʔΝٙή˙݊dɪࠑהΐவԬ
໔З݊ᗳˢʿᅰЗே̙Դ͜dසίԴࣛ͜܁ѓ analogRead א digitalRead у
̙dɽషᄣ̋Դ͜ᅁf
h GPIO 34-39 සঐਂމ፩ɝช͜dೌجЪމ፩̈͜f
h ESP32 ઼ਗ WiFi א BLE ܝdึЦ͜દεଡ଼ ADCdΪϤ 2,4,12,13,14,15,25,26,27
සঐᅰЗᛘ՟f
3. GND(深灰色):ટή͜d̸̛Ϟɓଡ଼dΥࠇՇଡ଼f
4. 5V 及 3.3V( 紅 色 ): Զཥ๕፩̈dɽʱ ESP32 සϞ 3.3V ፩̈dϾ
NodeMCU-32s ۆΝࣛԶ 5V ʿ 3.3V ፩̈f
5. GPIO 5,18,19,23(藍色):ୋɓଡ଼ SPI ޢࠦd݊ཫணٙ SPI ޢࠦf
6. GPIO 15,13,12,14(藍色):ୋɚଡ଼ SPI ޢࠦf
7. GPIO 1,3:Serial TX 及 RX(綠色):މ Arduino IDE ҏΐ္છൖٙྼЗໄd
ၾ USB port ஹd̙͜ၾՉ˼ༀໄ๖ஷ͜dܔᙄᛘ٫ᒒකԴ͜வՇࡈ໔Зd
ᒒеೌج፩̈ҏΐ༟ৃf
8. GPIO 21,22(紫色):Wire SDA, SCL ɰఱ݊ I2C ޢࠦdϞεༀໄમ͜
I2C ޢࠦஷৃdԷν LCDeښᑮᄃഃdΪϤᛘ٫߰ڢ̀ࠅᒒеԴ͜ϤՇ໔Зf
9. EN( 淺 橘 色 ):EN މ ࠠ อ ක ዚ ͜d ί EN ፩ ɝ LOW א ટ ή ࣛd ̙ ࠠ ઼
ESP32dɨ˙̸ਉ EN ܲඐၾ͉ PIN ஹdΪϤϤܲඐɰఱ݊ࠠකዚܲඐ RSTf
9