随笔分类 -  c/c++

学习笔记
摘要:esp8266+mqtt+继电器 使用mqtt 控制led灯 项目地址 https://gitee.com/zhudachangs/esp8266-mqtt-relay #include <Arduino.h> #include <Ticker.h> #include <ESP8266WiFi.h> 阅读全文
posted @ 2022-06-05 23:45 半截肥皂 阅读(548) 评论(0) 推荐(0)
摘要:ESP8266 + MQTT + 土壤湿度传感器 连线 #include <Arduino.h> #include <Ticker.h> #include <ESP8266WiFi.h> #include <PubSubClient.h> #define PIN_AO A0 #define PIN_ 阅读全文
posted @ 2022-05-31 22:48 半截肥皂 阅读(654) 评论(2) 推荐(0)
摘要:ESP8266 + MQTT + SG90(舵机) platformio 连线 ESP8266 MG90S(舵机) GND 棕色 VCC 红色 模拟引脚 橙色 源代码 https://gitee.com/zhudachangs/esp8266-mqtt-sg90.git 注意事项!!!! 舵机角度有 阅读全文
posted @ 2022-05-30 22:56 半截肥皂 阅读(1199) 评论(0) 推荐(0)
摘要:esp8266 + MQTT + DHT11(温湿度计) 连线 #include <Arduino.h> #include <ESP8266WiFi.h> #include <PubSubclient.h> #include "DHT.h" #define DHTPIN 4 #define DHTT 阅读全文
posted @ 2022-05-26 23:38 半截肥皂 阅读(436) 评论(0) 推荐(0)
摘要:esp8266 + mqtt + 温度计 上报温度数据 温度接线 ESP8266 温度传感器 GND GND 5V VCC A0 VOUT #include <Arduino.h> #include <ESP8266WiFi.h> #include <PubSubClient.h> // 温度 #i 阅读全文
posted @ 2022-05-25 20:56 半截肥皂 阅读(511) 评论(0) 推荐(0)
摘要:esp8266 + http 使用esp8266发起http请求 #include <Arduino.h> #include <ESP8266WiFi.h> #include <ESP8266HTTPClient.h> #define led_1 2 const char *SSID = "优美屋2 阅读全文
posted @ 2022-05-24 22:11 半截肥皂 阅读(284) 评论(0) 推荐(0)
摘要:ESP32+L298N+MQTT+4G无线远程监控+四驱动小破车 小车源代码 注意修改WIFI 信息 #include <analogWrite.h> #include <WiFi.h> #include <PubSubClient.h> #define led_one 18 // L298N In 阅读全文
posted @ 2022-05-14 20:27 半截肥皂 阅读(2162) 评论(0) 推荐(1)
摘要:目录 目录 介绍 准备 连线 代码 代码优化 运行 问题 总结 介绍 使用SN74HC595N 为 ESP8266 扩展 SN74HC595N(8位移位寄存器IC) 1. Vcc 16引脚 电压输入 (必须) 2. GND 地 (必须) 3. OE 需要接GND(必须) 4. MR 需要接高电压(必 阅读全文
posted @ 2022-05-09 16:57 半截肥皂 阅读(2129) 评论(0) 推荐(0)
摘要:L298N 知乎教程 L298N ESP8266 + L298N 连线 电机转的方向 电源引脚 VCC 外接直流电源引脚,电压范围在5~35V之间 GND GND是接地引脚,连接到电源负极 5V 驱动芯片内部逻辑供电引脚,如果安装了5V跳帽,则此引脚可输出5V电压,为微控板或其他电路提供电力供给,如 阅读全文
posted @ 2022-05-09 10:56 半截肥皂 阅读(2579) 评论(0) 推荐(0)
摘要:ESP8266+mg90s(舵机) 准备阶段 ESP8266(nodeMcu) MG90S(舵机) 面包板 线3 连线 ESP8266 MG90S(舵机) GND 棕色 VCC 红色 模拟引脚 橙色 代码阶段 #include <Arduino.h> #include <Servo.h> // 引用 阅读全文
posted @ 2022-05-09 10:49 半截肥皂 阅读(1229) 评论(0) 推荐(0)
摘要:ESP8266 + MQTT git 地址: https://gitee.com/zhudachangs/esp8266-mqtt.git (如果无法打开说明在审核) 引用库 #include <ESP8266WiFi.h> #include <PubSubClient.h> #include <T 阅读全文
posted @ 2022-05-09 10:43 半截肥皂 阅读(689) 评论(0) 推荐(0)
摘要:mac 使用vsCode 创建c/c++ 工程项目 并配置断点调试 使用vscode 创建c/c++工程项目 准备工作 使用 vscode 下载插件 C/C++ Project Generator 开始 一、使用快捷键 shift + command + p (mac) ctrl + shift + 阅读全文
posted @ 2021-12-10 14:55 半截肥皂 阅读(3086) 评论(0) 推荐(1)