arduino 摇杆操作
摇杆有两个 x/y 轴的模拟信号 ,一个按钮信号 此代码使用第三方防抖库检测按钮信息 按下后检测摇杆的 x 轴调整幅度,然后调整时间 #include "buttonTest.h" // 按钮防抖库, https://github.com/thomasfredericks/Bounce2 #include <Bounce2.h> // …
|
97
|
|
179 字
|
7 分钟
arduino DS1307 时间模块
#include "include.h" #include "rtcTest.h" #include <ArduinoLog.h> #include <RTClib.h> // https://www.arduino.cn/thread-91034-1-1.html // https://adafruit.github.io…
|
113
|
|
39 字
|
2 分钟
windows 监听端口失败处理
今天启动 adb 时出现错误,在 %temp%\adb.log 中提示创建监听端口失败 解析方案与 android studio 启动失败一新处理,将 adb 的 5037 端口加入至排除列表中 https://github.com/docker/for-win/issues/3171 # 查看排除端口 netsh interface ipv4 s…
|
103
|
|
86 字
|
2 分钟
ESP8266 开发
esp 8266 是 wifi 开发板 开发板连接 必须接 3.3v en 口接 3.3v 为 enable 的意思 tx 接开发板的 rx 口 rx 接开发板的 tx 口 我接在开发板的 rx/tx 口时,不能工作,所以我接在了 4/5 口 当需要重置的时候,将 res 接下地 其它的端口在烧入固件的时候使用 工作方式 接在 usb to ttl…
|
100
|
|
740 字
|
10 分钟
arduino 温度湿度计 (DH11)
data 接在数据接口上 #include "dhtTest.h" #include "DHT.h" // 接在 pin 3 上,型号 DHT11 DHT dht(3, DHT11); void initTemperature() { dht.begin(); } /** 更新温度 */ void updateTemperature() { aut…
|
98
|
|
40 字
|
2 分钟
arduino 1602 一些符号
发现 createChar 后直接 write 不能直接显示 // 自定义字符, 指定哪个像素亮,哪个灭 byte heart[8] = { 0b00000, 0b01010, 0b11111, 0b11111, 0b11111, 0b01110, 0b00100, 0b00000}; byte smiley[8] = { 0b00000, 0b0…
|
84
|
|
107 字
|
5 分钟
arduino 一些资料
详解Arduino Uno开发板的引脚分配图及定义:https://www.yiboard.com/thread-831-1-1.html Arduino 中文社区: https://www.arduino.cn/forum.php 【Arduino】168种传感器模块系列实验(资料+代码+图形+仿真) Arduino教程汇总贴 论坛(https:…
|
98
|
|
92 字
|
1 分钟内
arduino 拆分源码
在目录下创建 .h 与 .cpp 文件 inlcude.h 将常用文件引用放在这里 #ifndef _INCLUDE_H__ #define _INCLUDE_H__ //导入Arduino核心头文件, 必须 #include"Arduino.h" // 日志 #include <ArduinoLog.h> // #define DIS…
|
109
|
|
119 字
|
3 分钟
arduino 查询 I2C 设备地址
arduino 查询 I2C 设备地址 https://zhuanlan.zhihu.com/p/349791145 \#include <Wire.h> #include "I2cScan.h" // 扫描 i2c 地址 void scanI2C() { Log.infoln("开始扫描 I2C"); auto count = 0; …
|
90
|
|
42 字
|
2 分钟
arduino 调用 1602a
我的 1602a 使用 i2c 接口 不同芯片有不同的 I2C 地址, 从下面的链接查看 I2C LCD与Arduino接口 #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x3f, 16, 2); //声明I2C地址和点阵的规格为16字符和2行 // 定义字符.1, 指定哪个…
|
46
|
|
114 字
|
4 分钟