智能感应门改造工程

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

智能感应门改造工程

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));
            }

        }
    }
}

验收

见资源绑定

相关推荐
可为测控2 分钟前
图像处理基础(3):均值滤波器及其变种
图像处理·人工智能·均值算法
刘立军7 分钟前
本地大模型编程实战(20)用langgraph和智能体实现RAG(Retrieval Augmented Generation,检索增强生成)(4)
人工智能·后端·llm
Abdullah al-Sa26 分钟前
Docker教程(喂饭级!)
c++·人工智能·docker·容器
神经星星30 分钟前
无机材料逆合成效率飙升,韩国团队推出Retrieval-Retro,成果入选NeurIPS 2024
人工智能·深度学习·机器学习
大数据追光猿33 分钟前
【深度学习】Pytorch项目实战-基于协同过滤实现物品推荐系统
人工智能·pytorch·python·深度学习·ai编程·推荐算法
CodeJourney.43 分钟前
EndNote与Word关联:科研写作的高效助力
数据库·人工智能·算法·架构
jingwang-cs1 小时前
内外网文件传输 安全、可控、便捷的跨网数据传输方案
人工智能·后端·安全
乐享数科1 小时前
乐享数科:供应链金融—三个不同阶段的融资模式
大数据·人工智能·金融
幻想趾于现实1 小时前
视觉应用工程师(面试)
人工智能·数码相机·计算机视觉
简简单单做算法2 小时前
基于PSO粒子群优化的BiLSTM双向长短期记忆网络序列预测算法matlab仿真,对比BiLSTM和LSTM
人工智能·lstm·bilstm·pso-bilstm·pso·双向长短期记忆网络·序列预测