智能物联网鱼缸

硬件部分及接线图

工具

继电器、开发板、物联网os、云平台

微信小程序

结构:images、pages两个为主体。

标题头部分

javascript 复制代码
<view class="container">
<view class="head_box">
<image src="/images/面性鱼缸.png"></image>
<view>{{title}}</view>
</view>

图片png可以自己根据实际情况进行更换。这是一个view盒子,里面实现了标题效果。

对应的css样式:

css 复制代码
.head_box{
  display: inline-flex;
  padding-top: 120rpx;
}
.head_box > image{
  height: 100rpx;
  width: 100rpx;
}

天气预报盒子

javascript 复制代码
<view class="weather_box">
<view class="welcome_text">{{welcome}}</view>
<view class="flex">
<view class="w50">
<image wx:if="{{weatherText==='晴天'}}" src="/images/晴天.png" mode="widthFix" class="weather_png"></image>
<image wx:if="{{weatherText==='阴'}}" src="/images/阴天.png" mode="widthFix" class="weather_png"></image>
<image wx:if="{{weatherText==='多云'}}" src="/images/多云.png" mode="widthFix" class="weather_png"></image>
<image wx:if="{{weatherText==='小雨'}}" src="/images/小雨.png" mode="widthFix" class="weather_png"></image>
<image wx:if="{{weatherText==='中雨'}}" src="/images/中雨.png" mode="widthFix" class="weather_png"></image>
<image wx:if="{{weatherText==='大雨'}}" src="/images/大雨.png" mode="widthFix" class="weather_png"></image>
<image wx:if="{{weatherText==='暴雨'}}" src="/images/暴雨.png" mode="widthFix" class="weather_png"></image>
<image wx:if="{{weatherText==='雾'}}" src="/images/雾.png" mode="widthFix" class="weather_png"></image>
</view>
<view>
<view class="location_text">
<image src="/images/定位.png" class="location_png" mode="widthFix" ></image>
<text class="location_text">{{location}}</text>
</view>
<view class="tmp_text">{{tmp}}℃</view>
</view>
</view>
</view>

传感器信息盒子

javascript 复制代码
<view class="sensors_text">传感器设备</view>

<view class="sensors_system">
<view wx:for="{{sensorList}}" class="sensors_info">
      <view class="sensors_info1"> 
          <image src="{{item.img}}" style="height: 80rpx" mode="heightFix" ></image>
      </view>
      <view class="sensors_info2"> 
            <view>{{item.name}} </view>
            <view> {{item.parameter}}</view>
            <view> {{item.value}} {{item.unit}}</view>         
      </view>
      <view class="sensors_info3">! </view>
</view>
</view>

控制器盒子

javascript 复制代码
<view class="sensors_text">控制设备</view>

<view class="other_sensors" wx:for="{{otherSensorList}}" style="height: 120rpx" >

<view class="sensors_info1">
<image src="{{item.img}}" style="height: 70rpx; " mode="heightFix" ></image>
</view>
<view class="other_sensors_info2">{{item.name}}</view>

<view class=".other_sensors_info3"><switch checked="{{item.isOpen}}" data-param="{{item}}" bindchange="statusChange"/></view>
 

</view>

<view style="height: 60rpx;"></view>
</view>
相关推荐
乄夜1 小时前
嵌入式面试高频(5)!!!C++语言(嵌入式八股文,嵌入式面经)
c语言·c++·单片机·嵌入式硬件·物联网·面试·职场和发展
小柯博客4 小时前
从零开始打造 OpenSTLinux 6.6 Yocto 系统(基于STM32CubeMX)(九)
c语言·stm32·单片机·嵌入式硬件·物联网
禺垣10 小时前
区块链技术概述
大数据·人工智能·分布式·物联网·去中心化·区块链
小智学长 | 嵌入式15 小时前
SOC-ESP32S3部分:36-适配自己的板卡
单片机·物联网·esp32
打码人的日常分享1 天前
物联网智慧医院建设方案(PPT)
大数据·物联网·架构·流程图·智慧城市·制造
玩转4G物联网1 天前
零基础玩转物联网-串口转以太网模块如何快速实现与TCP服务器通信
服务器·网络·物联网·网络协议·tcp/ip·http·fs100p
光芒Shine1 天前
【物联网-ModBus-ASCII】
物联网·网络协议
weixin_418007601 天前
MQTTX连接阿里云的物联网配置
物联网·阿里云·云计算
十年小站1 天前
物联网协议之MQTT(二)服务端
物联网
光芒Shine1 天前
【物联网-ModBus-RTU
物联网·网络协议