作者lhz135 (PPP)
看板Electronics
标题[问题] nodeMCU在arduinoIDE的脚位定义
时间Sun Jan 5 02:05:46 2020
各位大喽 想请教node MCU脚位的定义是多少呢?
如下述引用的网址中的nodemcu脚位
https://www.est.idv.tw/nodemcubme280建立气象收集站并传送到wunderground/
又如下的程式范例
LED_BULTIN脚位定义如(4 或D4 或GPIO或TXD1都不能取代LED_BULTIN)
请教该怎麽在程式码中定义该D4脚呢?
谢谢
void setup() {
pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level
// but actually the LED is on; this is because
// it is active low on the ESP-01)
delay(1000); // Wait for a second
digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH
delay(2000); // Wait for two seconds (to demonstrate the active low LED)
}
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 111.243.146.116 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Electronics/M.1578161149.A.659.html
1F:→ lhz135: 找到了 估计是板子选错了 拍谢~ 01/06 01:15