当前位置: 首页 > news >正文

电子商务网站设计书WordPress文章收录

电子商务网站设计书,WordPress文章收录,宝塔上安装wordpress,html网站优化Ciso声明:本篇文章基于使用腾讯云物联网平台连接自定义esp8266物联网设备(腾讯连连控制开关实现) - CSDN App改编 一、总体概览 功能描述: 使用腾讯连连小程序进行控制, Alarm(警铃):开的时候&#xff…

Ciso声明:本篇文章基于使用腾讯云物联网平台连接自定义esp8266物联网设备(腾讯连连控制开关实现) - CSDN App改编

一、总体概览

功能描述:

使用腾讯连连小程序进行控制,

Alarm(警铃):开的时候,亮红灯;关的时候关闭。

RGB LED(三色灯):有4个属性值,Red,Green,Blue,OFF,分别对应红灯,绿灯,蓝灯,关闭。

Fan(风扇):有3个属性值,OFF,Low,High,分别对应关闭、一档、二档。

MCU(单片机):控制这三个设备

二、Ciso模拟器部分

MCU(单片机编程):

from realudp import *

from time import *

from gpio import *

from options import Options

from time import *

import math

from physical import *

from gpio import *

from environment import Environment

from ioeclient import IoEClient

IP = "127.0.0.1"

PORT = 1834

switchStatus="0"

colorStr="0"

colorID =3

bright =1023

fengShanControl="0"

#from pyjs import *

def onLedRGB(rgb):

if rgb==0:

#digitalWrite(1,HIGH)

#digitalWrite(2,LOW)

#digitalWrite(3,LOW)

analogWrite(1,bright)

analogWrite(2,0)

analogWrite(3,0)

if rgb==1:

#digitalWrite(1,LOW)

#digitalWrite(2,HIGH)

#digitalWrite(3,LOW)

analogWrite(1,0)

analogWrite(2,bright)

analogWrite(3,0)

if rgb==2:

#digitalWrite(1,LOW)

#digitalWrite(2,LOW)

#digitalWrite(3,HIGH)

analogWrite(1,0)

analogWrite(2,0)

analogWrite(3,bright)

if rgb==3:

digitalWrite(1,LOW)

digitalWrite(2,LOW)

digitalWrite(3,LOW)

def onUDPReceive(ip, port, data):

global colorStr

global switchStatus

global colorID

global bright

global fengShanControl

print("received from "

+ ip + ":" + str(port) + ":" + data);

data2 = data.split('{')[2].split('}')[0]

print("data2:  "+data2)

for i in range(0,len(data2)):

if( data2[i] == 's' and data2[i+1] == 'w'):

switchStatus = data2[i+8]

print("switchStatus = "+switchStatus)

if( data2[i] == 'c' and data2[i+1] == 'o'):

colorStr = data2[i+7]

print("colorStr = "+colorStr)

if( data2[i] == 'f' and data2[i+1] == 'e'):

fengShanControl = data2[i+10]

print("fengShanControl = "+fengShanControl)

if "0" in colorStr:

colorID = 0

onLedRGB(colorID)

if "1" in colorStr:

colorID = 1

onLedRGB(colorID)

if "2" in colorStr:

colorID = 2

onLedRGB(colorID)

if "3" in colorStr:

colorID = 3

onLedRGB(colorID)

if "0" in switchStatus:

digitalWrite(4,LOW)

#client.send("Alarm Closed!")

if "1" in switchStatus:

digitalWrite(4,HIGH)

#client.send("Alarm Opened!")

if "0" in fengShanControl:

customWrite(0,"0")

if "1" in fengShanControl:

customWrite(0,"1")

if "2" in fengShanControl:

customWrite(0,"2")

def main():

socket = RealUDPSocket()

socket.onReceive(onUDPReceive)

print(socket.begin(1834))

pinMode(1,OUT)

pinMode(2,OUT)

pinMode(3,OUT)

pinMode(4,OUT)

count = 0

while True:

# count += 1

# socket.send(IP, PORT, "hello " + str(count))

sleep(1)

if __name__ == "__main__":

main()

三、腾讯云物联网开发平台

参考链接里的博客

四、腾讯连连小程序

扫描腾讯云的二维码即可

五、演示视频

http://www.yayakq.cn/news/519713/

相关文章:

  • 网站5建设需要学什么时候开始色系网站.
  • 如何设定旅游网站seo核心关键词app平台开发定制软件
  • 网站建设违约建筑工程公司排名
  • 免费建设com网站知名高校网站建设
  • 创业做招商加盟类网站赚钱高中做信息技术题网站
  • 陇南网站制作wordpress摘要图片
  • 响应式单页网站模板内蒙古网站备案
  • 东莞网站设计智能 乐云践新人际网络营销三商法
  • 第一页网站SEO法国企业网站建设
  • 东莞seo建站优化公司怎样用手机做网站
  • 网站开发项目流程书淘宝网站jquery
  • 做电影网站怎样赚钱品牌网站建设方
  • 做网站用cms好吗陕西建设网站官方
  • 搭建网站需要哪些东西绿建设计院网站
  • 网站建设经典教材中国机械设备网官网
  • 怎么用ps做京东网站模板赣州网站优化公司
  • 做资讯网站需要什么条件网站推广免费渠道
  • 手机制作企业网站wordpress博客源码下载
  • 网上做的比较好的竞彩网站汽车技术资料网站建设
  • 客户做外贸用那些网站wordpress增加面包屑导航
  • 东莞网站建设公司直播带视频的网站模板
  • 长尾关键词挖掘工具爱网站果酱wordpress
  • 南昌知名的网站建设公司比较有趣的网站
  • 站群服务器是什么意思做网站.服务器怎么买
  • 网站建设公司 广告法被处罚网站设计模板中的页
  • 郑州正云网站建设wordpress 底部悬浮
  • 网站建设急单辽宁东方建设工程有限公司网站
  • 网站 备案 时间seo百度刷排名
  • 深圳家居网站建设公司wordpress 连接丢失.保存已被禁用_直到您重新连接.
  • 中国铁道建设协会网站找做课件的网站