91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 12.01MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-06-17
  • 語言: C#
  • 標(biāo)簽: 單片機??C#??PT100??

資源簡介

使用STC12C5A60S2單片機,通過PT100傳感器測量溫度,并通過無線傳輸模塊,傳輸?shù)诫娔X,通過上位機實時顯示。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.IO.Ports;
namespace?PT100_Project
{
????public?partial?class?Login?:?Form
????{
????????public?Login()
????????{
????????????InitializeComponent();
????????}
????????//搜索串口
????????private?void?SearchAndAddSerialToComBox(SerialPort?Myport?ComboBox?MyBox)
????????{
????????????String[]?MyString?=?new?string[10];
????????????string?Buffer;
????????????MyBox.Items.Clear();//移除所有COM口
????????????int?count?=?0;
????????????for?(int?i?=?0;?i?<=?10;?i++)
????????????{
????????????????try
????????????????{
????????????????????Buffer?=?“COM“?+?i.ToString();
????????????????????Myport.PortName?=?Buffer;
????????????????????Myport.Open();
????????????????????MyString[count++]?=?Buffer;
????????????????????MyBox.Items.Add(Buffer);
????????????????????Myport.Close();
????????????????}
????????????????catch
????????????????{
????????????????}
????????????}
????????????MyBox.Text?=?MyString[0];
????????????//搜索沒有找到可用串口則會提示,屏蔽沒有提示
????????????if?(MyBox.Text?==?““)
????????????{
????????????????MessageBox.Show(“沒有找到可用串口請重試!“);
????????????}
????????}
????????private?void?btnSearch_Click(object?sender?EventArgs?e)
????????{
????????????cboxCOM.Text?=?“搜索中“;
????????????SearchAndAddSerialToComBox(SPdataLogin?cboxCOM);
????????}

????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????SearchAndAddSerialToComBox(SPdataLogin?cboxCOM);//搜索可用串口
????????}

????????private?void?btnLogin_Click(object?sender?EventArgs?e)
????????{
????????????if?(cboxCOM.Text?==?““)
????????????{
????????????????MessageBox.Show(“沒有檢測到上位機組件,請重試!“);
????????????????return;
????????????}
????????????if?(txtuser.Text?==?““)
????????????{
????????????????MessageBox.Show(“賬號不能為空“);
????????????????return;
????????????}
????????????if?(txtpassword.Text?==?““)
????????????{
????????????????MessageBox.Show(“密碼不能為空“);
????????????????return;
????????????}

????????????try
????????????{
????????????????SPdataLogin.PortName?=?cboxCOM.Text;
????????????????SPdataLogin.Open();
????????????????SPdataLogin.Close();
????????????}
????????????catch
????????????{
????????????????MessageBox.Show(“登陸失敗!!!串口設(shè)備打開錯誤“);
????????????????return;
????????????}

????????????if?((txtuser.Text?==?“admin“)?&&?(txtpassword.Text?==?“admin“))
????????????{


????????????????MessageBox.Show(“登陸成功“);

????????????????Login?Login?=?new?Login();
????????????????this.Hide();


????????????????MainControl?MainControl?=?new?MainControl();//實例化一個MainControl窗口


????????????????MainControl.String1?=?cboxCOM.Text;//設(shè)置MainControl中String1的值
????????????????MainControl.SetValue();//設(shè)置Form2中Label1的


????????????????MainControl.ShowDialog();


????????????}
????????????else
????????????{
????????????????Me

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-06-24?12:24??實物照片\
?????文件?????2749593??2018-01-29?20:31??實物照片\IMG_8830.JPG
?????文件?????2339868??2018-01-29?20:32??實物照片\IMG_8831.JPG
?????文件?????2300376??2018-01-29?20:30??實物照片\IMG_8832.JPG
?????目錄???????????0??2018-06-24?12:24??源代碼\
?????目錄???????????0??2018-06-24?12:24??源代碼\上位機(C#)程序\
?????目錄???????????0??2018-06-27?23:28??源代碼\上位機(C#)程序\PT100_Project\
?????目錄???????????0??2018-06-27?23:28??源代碼\上位機(C#)程序\PT100_Project\.vs\
?????目錄???????????0??2018-06-28?00:24??源代碼\上位機(C#)程序\PT100_Project\.vs\PT100_Project\
?????目錄???????????0??2018-06-28?00:24??源代碼\上位機(C#)程序\PT100_Project\.vs\PT100_Project\DesignTimeBuild\
?????文件?????????276??2018-06-28?00:24??源代碼\上位機(C#)程序\PT100_Project\.vs\PT100_Project\DesignTimeBuild\.dtbcache
?????目錄???????????0??2018-06-27?23:28??源代碼\上位機(C#)程序\PT100_Project\.vs\PT100_Project\v15\
?????文件???????55808??2018-09-14?10:04??源代碼\上位機(C#)程序\PT100_Project\.vs\PT100_Project\v15\.suo
?????目錄???????????0??2018-06-27?23:28??源代碼\上位機(C#)程序\PT100_Project\.vs\PT100_Project\v15\Server\
?????目錄???????????0??2018-06-27?23:28??源代碼\上位機(C#)程序\PT100_Project\.vs\PT100_Project\v15\Server\sqlite3\
?????文件???????????0??2018-06-27?23:28??源代碼\上位機(C#)程序\PT100_Project\.vs\PT100_Project\v15\Server\sqlite3\db.lock
?????文件????????4096??2018-06-27?23:28??源代碼\上位機(C#)程序\PT100_Project\.vs\PT100_Project\v15\Server\sqlite3\storage.ide
?????文件???????32768??2018-09-14?10:04??源代碼\上位機(C#)程序\PT100_Project\.vs\PT100_Project\v15\Server\sqlite3\storage.ide-shm
?????文件??????679832??2018-06-27?23:29??源代碼\上位機(C#)程序\PT100_Project\.vs\PT100_Project\v15\Server\sqlite3\storage.ide-wal
?????目錄???????????0??2018-06-24?12:24??源代碼\上位機(C#)程序\PT100_Project\PT100_Project\
?????文件?????????881??2018-01-25?18:27??源代碼\上位機(C#)程序\PT100_Project\PT100_Project.sln
?????文件???????27648??2019-10-15?18:18??源代碼\上位機(C#)程序\PT100_Project\PT100_Project.suo
?????目錄???????????0??2018-06-24?12:24??源代碼\上位機(C#)程序\PT100_Project\PT100_Project\bin\
?????目錄???????????0??2018-06-24?12:24??源代碼\上位機(C#)程序\PT100_Project\PT100_Project\bin\Debug\
?????目錄???????????0??2018-06-24?12:24??源代碼\上位機(C#)程序\PT100_Project\PT100_Project\bin\Debug\picture\
?????文件???????14338??2018-01-29?20:10??源代碼\上位機(C#)程序\PT100_Project\PT100_Project\bin\Debug\picture\20180129201047.png
?????文件???????14583??2018-01-29?20:21??源代碼\上位機(C#)程序\PT100_Project\PT100_Project\bin\Debug\picture\20180129202147.png
?????文件???????14583??2018-01-29?20:22??源代碼\上位機(C#)程序\PT100_Project\PT100_Project\bin\Debug\picture\2018012920220.png
?????文件???????17159??2018-01-29?20:23??源代碼\上位機(C#)程序\PT100_Project\PT100_Project\bin\Debug\picture\20180129202333.png
?????文件????????2818??2018-02-16?21:24??源代碼\上位機(C#)程序\PT100_Project\PT100_Project\bin\Debug\picture\20180216212442.png
?????文件???????19456??2018-02-16?21:34??源代碼\上位機(C#)程序\PT100_Project\PT100_Project\bin\Debug\PT100_Project.exe
............此處省略64個文件信息

評論

共有 條評論