8266 12f 4路开关 实现4个本地按钮 小爱同学,我是新手,大...6-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

楼主: itfangli

[分享] 8266 12f 4路开关 实现4个本地按钮 小爱同学,我是新手,大...6

[复制链接]
 楼主| 发表于 2020-3-23 08:21 来自手机 | 显示全部楼层
涟水河 发表于 2020-3-23 01:41
另外状态反馈在我这好像只有开始时对,之后就不行了,

你说app的按钮反馈?这个好像和网络有关系,我家移动的,稍微多按几下,或者按快点就卡顿,要缓缓。但是我在酒吧用电信的网络几乎试不出迟缓。可能真的和网络有关系吧
 楼主| 发表于 2020-3-23 22:17 | 显示全部楼层
涟水河 发表于 2020-3-23 01:02
楼主,我小白,请问这个
#define Socket1 D5   //设置亮灯的接口
#define Socket2 D6   //设置亮灯的接口

lua.jpg timg.jpg 我没有小黑板,对应下引脚编号,注意开发板的选择。只要都选对了编译成功率就很高。
我的ide还经常丢失端口。
百度了一个地球,无解,win7都搞到win10了也没改善



 楼主| 发表于 2020-3-23 22:54 | 显示全部楼层

简易pcb是这样练成的
不干胶用激光打印+电烫斗
环保腐蚀,做多了才会熟练
(一定要带点温度,pcb才会酸爽,而且还要摇起来)
微信图片_20200323222837.jpg
腐蚀好冲水检查
微信图片_20200323222807.jpg
再检查
微信图片_20200323222846.jpg
准备好的8266 12f(好像贵了2块钱,听卖家说正版的,非副厂货,我之前用的玩的都是副厂,包括D1开发板上的的确是副厂的,不过也没毛病)
贵了2块,不舍得只买了这1块
微信图片_20200323222822.jpg

15岁开始拿烙铁的我,感觉不是我技术差了,真的是管脚太小了。为这又想搞个微距摄像头了(又想折腾了)
微信图片_20200323222826.jpg
检查。。。。。。
微信图片_20200323222859.jpg

基本元件上齐
微信图片_20200323222903.jpg
自制继电器模块,5v的最后几个全给酒吧了,剩下这次用12v的。5v和12电路基本不用改,就是5v可以ac-dc5v直接用1117 3.3v给8266供电。但12v就不能用1117了哪怕7805也会发热严重。只能用adj的电路或者模块,其实这部分我们没必要自己瞎搞,2块钱的调压模块就可以搞定。
微信图片_20200323222850.jpg

说吧,次次做次次错,没事瞎搞,这块板根本不用反着做,不过也就做着瞎玩而已
电线穿板再焊接起来会好看一些,固定性也会好点,好吧,我承认又错了!

微信图片_20200323222854.jpg


发表于 2020-4-1 21:55 | 显示全部楼层
这个手工只有膜拜
发表于 2020-4-3 21:16 | 显示全部楼层
提示exit status 1
Blinker.h: No such file or directory
这个是什么原因  谢谢
发表于 2020-4-4 16:00 | 显示全部楼层
出现这样的错误怎么回事  谢谢
C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino: In function 'void miotPowerState(const String&, uint8_t)':

xacz:5:17: error: 'D6' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:118:12: note: in expansion of macro 'Socket1'

xacz:6:17: error: 'D7' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:121:12: note: in expansion of macro 'Socket2'

xacz:7:17: error: 'D0' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:124:12: note: in expansion of macro 'Socket3'

xacz:8:17: error: 'D5' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:127:12: note: in expansion of macro 'Socket4'

xacz:5:17: error: 'D6' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:135:20: note: in expansion of macro 'Socket1'

xacz:6:17: error: 'D7' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:136:20: note: in expansion of macro 'Socket2'

xacz:7:17: error: 'D0' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:137:20: note: in expansion of macro 'Socket3'

xacz:8:17: error: 'D5' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:138:20: note: in expansion of macro 'Socket4'

xacz:145:5: error: 'BlinkerMIOT' was not declared in this scope

xacz:5:17: error: 'D6' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:153:20: note: in expansion of macro 'Socket1'

xacz:6:17: error: 'D7' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:154:20: note: in expansion of macro 'Socket2'

xacz:7:17: error: 'D0' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:155:20: note: in expansion of macro 'Socket3'

xacz:8:17: error: 'D5' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:156:20: note: in expansion of macro 'Socket4'

xacz:163:5: error: 'BlinkerMIOT' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino: In function 'void button1_callback(const String&)':

xacz:5:17: error: 'D6' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:174:18: note: in expansion of macro 'Socket1'

xacz:5:17: error: 'D6' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:179:18: note: in expansion of macro 'Socket1'

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino: In function 'void button2_callback(const String&)':

xacz:6:17: error: 'D7' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:188:18: note: in expansion of macro 'Socket2'

xacz:6:17: error: 'D7' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:193:18: note: in expansion of macro 'Socket2'

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino: In function 'void button3_callback(const String&)':

xacz:7:17: error: 'D0' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:202:18: note: in expansion of macro 'Socket3'

xacz:7:17: error: 'D0' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:207:18: note: in expansion of macro 'Socket3'

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino: In function 'void button4_callback(const String&)':

xacz:8:17: error: 'D5' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:216:18: note: in expansion of macro 'Socket4'

xacz:8:17: error: 'D5' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:221:18: note: in expansion of macro 'Socket4'

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino: In function 'void sdms()':

xacz:5:17: error: 'D6' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:232:19: note: in expansion of macro 'Socket1'

xacz:5:17: error: 'D6' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:242:19: note: in expansion of macro 'Socket1'

xacz:6:17: error: 'D7' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:253:19: note: in expansion of macro 'Socket2'

xacz:6:17: error: 'D7' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:263:19: note: in expansion of macro 'Socket2'

xacz:7:17: error: 'D0' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:275:19: note: in expansion of macro 'Socket3'

xacz:7:17: error: 'D0' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:285:19: note: in expansion of macro 'Socket3'

xacz:8:17: error: 'D5' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:297:19: note: in expansion of macro 'Socket4'

xacz:8:17: error: 'D5' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:307:19: note: in expansion of macro 'Socket4'

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino: In function 'void setup()':

xacz:5:17: error: 'D6' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:332:11: note: in expansion of macro 'Socket1'

xacz:6:17: error: 'D7' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:335:11: note: in expansion of macro 'Socket2'

xacz:7:17: error: 'D0' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:338:11: note: in expansion of macro 'Socket3'

xacz:8:17: error: 'D5' was not declared in this scope

C:\Users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xacz\xacz.ino:341:11: note: in expansion of macro 'Socket4'

xacz:354:3: error: 'BlinkerMIOT' was not declared in this scope

exit status 1
'D6' was not declared in this scope

 楼主| 发表于 2020-4-4 16:54 来自手机 | 显示全部楼层
362902415h 发表于 2020-4-3 21:16
提示exit status 1
Blinker.h: No such file or directory
这个是什么原因  谢谢

点灯的库文件你复制了吗
 楼主| 发表于 2020-4-4 18:59 来自手机 | 显示全部楼层
362902415h 发表于 2020-4-4 16:00
出现这样的错误怎么回事  谢谢
C:%users\Administrator.WINMICR-DLLH4J7\Desktop\智能四路插座-高电平开\xa ...

开发版你怎么选的?
发表于 2020-4-4 21:34 | 显示全部楼层
itfangli 发表于 2020-4-4 18:59
开发版你怎么选的?

我选的是Generic esp8266 module  我的是esp8266 12f   我上传官方的可以   我想做这个四路的  编译就是这样了
 楼主| 发表于 2020-4-5 21:06 | 显示全部楼层
362902415h 发表于 2020-4-4 21:34
我选的是Generic esp8266 module  我的是esp8266 12f   我上传官方的可以   我想做这个四路的  编译就是 ...

NewImage.jpg
你试试和我的调起来一样,不行再留言
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 13:39 , Processed in 0.123135 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表