智能感应门改造工程

今天记录一下物联网专业学的工程步骤及实施过程

智能感应门改造工程

1 规划设计

1.1 项目设备清单

1.2项目接线图

软件设计

信号流

设备安装与调试


工程函数

工程界面:

c 复制代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using NewlandLibraryHelper;
using System.Windows.Threading;
using System.Threading;
namespace 单元2
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow ()
        {
            InitializeComponent ();
        }
        Adam4150 adam_helper;
        private void Window_Loaded (object sender, RoutedEventArgs e)
        {
            adam_helper = new Adam4150 ();
            adam_helper.Open ("Com4");
            DispatcherTimer timer = new DispatcherTimer ();
            timer.Interval = TimeSpan.FromSeconds (1);
            timer.Tick += timer_Tick;
            timer.Start ();

        }
        void timer_Tick(object sender,EventArgs e)
        {
            bool? InSuccess = adam_helper.getAdam4150_DIValue (6);
            if (InSuccess == true)
            {
                txt.Text = "有人";
                image.Source = new BitmapImage (new Uri ("Images/开门.png", UriKind.Relative));
                Thread.Sleep (3000);
            }
            else
            {
                txt.Text = "无人";
                image.Source = new BitmapImage (new Uri ("Images/关门.png", UriKind.Relative));
            }

        }
    }
}

验收

见资源绑定

相关推荐
孔汤姆4 分钟前
ESP32 掌机改造全记录:WiFi 遥测、一键启动 AI 终端
人工智能
HyperAI超神经4 分钟前
【vLLM 学习】Disaggregated Prefill
人工智能·深度学习·学习·vllm
我星期八休息1 小时前
网络编程—网络层
开发语言·前端·网络·人工智能·智能路由器
逻辑君1 小时前
ANNA 7.2 方块机器人实验技术报告
人工智能·深度学习·机器学习·机器人
菜鸟‍1 小时前
【论文学习】Medical Image Analysis 2024 || 医学图像分割中失败检测方法的比较基准研究:揭示置信度聚合的作用
人工智能·学习
AI导出鸭1 小时前
怎么让千问做表格?AI导出鸭苹果版将千问输出的管道表格智能解析为二维结构,一键导出为Excel或Word标准表格。
人工智能·chatgpt·word·excel·ai导出鸭
陈嘿萌1 小时前
ECCV 2026 | 南开&OPPO开源 ExpoMotion:首个大规模动态多曝光融合数据集
人工智能·计算机视觉·图像融合·南开大学·新数据集·expomotion·多曝光融合
zyplayer-doc2 小时前
zyplayer-doc企业知识库能做什么:从文档创建、权限管理到AI问答的完整能力
大数据·javascript·数据库·人工智能·pdf·word
IT_陈寒2 小时前
为什么我的Java Stream流操作会吃掉内存?
前端·人工智能·后端
babe小鑫2 小时前
人工智能专业方向梳理的实用清单
人工智能