1.接线
espb266 | LED |
---|---|
D0 | 电阻+ |
G | 负极 |
在线路上串联上一个电阻,防止过载
## 2.程序
// 设置程序信息
void setup() {
// 设置gpio输入针脚为16号
(16, OUTPUT);
pinMode}
// void loop() 程序中重复执行
void loop() {
(16, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite//delay(1000); // 延迟1s
//digitalWrite(16, LOW); // turn the LED off by making the voltage LOW
//delay(1000); // wait for a second
}