|
介绍Annex WI-FI RDS, 是运行在ESP8266, 有Web IDE,使用Basic 语言, HTML。他是今年2019 年3月才推出的。
用 AnnexToolKit , 通过串口刷入
刷好后, 可以通过浏览器访问ESP8266
访问192.168.1.8, 看到Web IDE, 可以开始编程了
代码是大概这样的, 下面是控制续电器开关
- CODE: example1.bas
- ''''''''''''''''''''''''''''''''''''''''''''''''''
- ' ANNEX WI-FI Basic
- 'example-1
- 'Simple button controlling a pin toggle function
- 'can be connected to a relay module
- ''''''''''''''''''''''''''''''''''''''''''''''''''
- relay = 16 ' the relay is connected on the pin GPIO16 (D0 on nodemcu module)
- v = 0 ' initial value of the output
- onHtmlReload create_page 'defines the page that will be sent at first connection
- gosub create_page ' draw the page at the first run
- wait ' wait for events
- create_page: ' this is the html page
- ' clear the screen
- cls
- html button$("RELAY", toggle_relay) ' draws a button
- html led$(v) ' draws a led
- return
- toggle_relay:
- v = 1 - v ' invert the status of the output
- pin(relay) = v 'set the output pin (the relay)
- refresh 'refresh the status of the led
- return
复制代码
运行Run 后, 看到输出界面是这样的, 一个Relay 的按钮,输出相对在GPIO16 (或NodeMCU的D0)
有兴趣可以看看:
https://sites.google.com/site/annexwifi/home
附件: Annex Package.zip 是刷机软件, 解压, 直接运行。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
阿莫论坛20周年了!感谢大家的支持与爱护!!
一只鸟敢站在脆弱的枝条上歇脚,它依仗的不是枝条不会断,而是自己有翅膀,会飞。
|