智能感应门改造工程

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

智能感应门改造工程

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

        }
    }
}

验收

见资源绑定

相关推荐
CodeLinghu1 分钟前
提示词链模式:一种利用LLM大语言模型处理复杂任务的强大范式
前端·人工智能·语言模型
Wilber的技术分享4 分钟前
【大模型实战笔记 8】深入理解 LangGraph:构建可持久化、多智能体的 LLM 工作流
人工智能·笔记·agent·langgraph·智能体开发
小二·8 分钟前
AI工程化实战《二》:RAG 高级优化全解——从 HyDE 到 Self-RAG,打造高精度企业问答系统
人工智能·microsoft·机器学习
yuhaiqun198910 分钟前
学AI Agent:从React模式到Plan框架,3条路径一次学透
人工智能·经验分享·笔记·react.js·机器学习·ai·aigc
zhonghua88101619 分钟前
spring ai alibab agent之ReactAgent深度解读
java·人工智能·spring
大模型教程.22 分钟前
收藏级教程:ReAct模式详解,让大模型从回答问题到解决问题
前端·人工智能·机器学习·前端框架·大模型·产品经理·react
飞凌嵌入式23 分钟前
AIoT出海背景下,嵌入式主控的国际认证之路与价值思考
大数据·人工智能·嵌入式硬件·区块链·嵌入式
Robot侠30 分钟前
多模态大语言模型(Multimodal LLM)技术实践指南
人工智能·语言模型·自然语言处理·transformer·rag·多模态大模型
roman_日积跬步-终至千里42 分钟前
【计算机视觉概述】:从像素到理解的完整图景
人工智能·计算机视觉
Light601 小时前
【MCP原生时代】第7篇|治理与合规:在模型驱动自动化中把控法律、隐私与伦理风险——把“能做什么”变成可审计、可解释、可追责的企业能力
人工智能·隐私·审计·治理·合规·mcp·伦理