通过此IO对应表可以将NodeMCU 的丝印和原IO定义对应起来。
可以将此文件定义为system.h 包含到需要调用的文件即可。
/* * @Author: Argon * @Date: 2021-03-16 19:41:04 * @LastEditTime: 2021-11-01 10:49:27 * @LastEditors: Argon * @Description: define esp8266 io pin to Dx * @FilePath: \espc:\Arduino_Smart_Light\blink\system.h */ #ifndef __SYSTEM_H__ #define __SYSTEM_H__ const uint8_t D0 = 16; const uint8_t D1 = 5; const uint8_t D2 = 4; const uint8_t D3 = 0; const uint8_t D4 = 2; const uint8_t D5 = 14; const uint8_t D6 = 12; const uint8_t D7 = 13; const uint8_t D8 = 15; const uint8_t D9 = 3; const uint8_t D10 = 1; const uint8_t analogInPin = A0; //ESP8266模拟引脚ADC0,也就是A0 #endif // !__SYSTEM_H__