工具

  • esp8266 开发板
  • 水位监测模块
  • 杜邦线

实验连线

esp 8266 核心版 的 3v 接水位监测模块的”+”, “G” 接 “-“, “A0” 接S

程序代码

1
2
3
4
5
6
7
8
9
10
void setup() {
Serial.begin(115200);// 设置串口波特率115200

}

// the loop function runs over and over again forever
void loop() {
Serial.printf("hello world!\n"); // 向串口发送字符
delay(500); // 延迟500ms
}