智能感应门改造工程

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

智能感应门改造工程

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

        }
    }
}

验收

见资源绑定

相关推荐
10x1010 分钟前
企业 AI 真正的分水岭:不是人人都在用,而是工作方式被重新设计
人工智能
收放扳机34 分钟前
PCB产线的“柔性”是怎么实现的——从自动化上下料设备兼容性看产线弹性
人工智能·科技·自动化·制造·pcb工艺
天上路人1 小时前
全功能AI语音处理模组的算法集成与接口设计分析
人工智能·ai语音·麦克风·回音消除
触底反弹1 小时前
🔥 保姆级教程|SSE + BFF + 跨域三件套,从零实现 ChatGPT 流式输出(附完整代码)
人工智能·node.js·vite
嘿丨嘿1 小时前
VLA 入门(六):VLA 如何进行强化学习后训练?
人工智能·python·深度学习·机器人
触底反弹2 小时前
🔥 从零搭建 RAG 知识库:爬虫→分词→向量化→检索,一步都不能错
javascript·人工智能·面试
zhou lily2 小时前
超自动化落地:RPA+AI如何打通业务流程的“最后一公里”?
人工智能·自动化·rpa
tyqtyq222 小时前
HarmonyOS AI 应用开发实战:简历项目经历改写系统
人工智能·学习·华为·生活·harmonyos
小柯南敲键盘3 小时前
批量图片翻译与视频字幕一站式解决高效跨境电商沟通难题
大数据·人工智能·python·音视频
FreeBuf_3 小时前
仅用六分钟,黑客借助Gemini CLI自主构建并迁移C&C僵尸网络
网络·人工智能