智能感应门改造工程

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

智能感应门改造工程

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

        }
    }
}

验收

见资源绑定

相关推荐
AEIC学术交流中心1 小时前
【快速EI检索 | ICPS出版】2026年计算机技术与可持续发展国际学术会议(CTSD 2026)
人工智能·计算机网络
玄同7651 小时前
Python Random 模块深度解析:从基础 API 到 AI / 大模型工程化实践
人工智能·笔记·python·学习·算法·语言模型·llm
风指引着方向1 小时前
昇腾 AI 开发生产力工具:CANN CLI 的高级使用与自动化脚本编写
运维·人工智能·自动化
算法狗21 小时前
大模型面试题:1B的模型和1T的数据大概要训练多久
人工智能·深度学习·机器学习·语言模型
23遇见1 小时前
CANN与开源生态:如何融入并赋能主流AI框架的NPU后端支持
人工智能
工程师老罗1 小时前
YOLOv1数据增强
人工智能·yolo
大模型真好玩1 小时前
中美大模型“内战”都怎么打!一文详解Claude Opus 4.6和GPT-5.3 CodeX核心特性
人工智能·agent·deepseek
啊森要自信1 小时前
CANN ops-cv:揭秘视觉算子的硬件感知优化与内存高效利用设计精髓
人工智能·深度学习·架构·transformer·cann
说私域1 小时前
流量裂变与数字重塑:基于AI智能名片小程序的短视频全域引流范式研究
人工智能·小程序·流量运营·私域运营
繁华落尽,寻一世真情1 小时前
【基于 AI 的智能小说创作助手】MuMuAINovel-sqlite 基于 AI 的智能小说创作助手
数据库·人工智能·sqlite