女人自慰AV免费观看内涵网,日韩国产剧情在线观看网址,神马电影网特片网,最新一级电影欧美,在线观看亚洲欧美日韩,黄色视频在线播放免费观看,ABO涨奶期羡澄,第一导航fulione,美女主播操b

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
會員中心
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示

RFID和藍牙門鎖的制作

454398 ? 來源:wv ? 2019-09-26 11:18 ? 次閱讀

步驟1:所需的零件

必需的零件。

1-帶拇指的門鎖打開門的內部

1-Arduino Uno r3(或兼容)

1-360度伺服系統

1-HC-06藍牙模塊

1-RC522 RFID閱讀器(可能是Sintron,不記得了)

1-16 x 2-4線LDC屏幕

1-RGB LED

2-220Ω電阻器

1-瞬時按動開關(從內部操作以鎖定/

1-1-1kΩ電阻

2-雙后箱(1個約45mm深度,另一個約33mm深度)

跳線

電源(我打算使用2 x 9v電池,但已決定使用市電供電的9v電源,因為更可靠)

螺絲或堅固的雙面膠帶

1-伺服支架(我自己設計和印刷)

** ----------------等待發貨-------- ------------------- ------------ **

2-雙盲板

1-12芯報警電纜的長度(長度取決于放置位置)

2-5amp模塊連接器(每個12線)

** --------------------------- -------------------------------------------------- ---- **

Andriod藍牙鎖應用程序。 BTControl.apk

步驟2:接線

RFID和藍牙門鎖的制作

電源:

9v穩壓電源(或電池)

RFID讀取器:

VCC-引腳3.3v

GND-GND

重置(RST)-引腳D9

SDA(SS)-引腳D10

MOSI-引腳D11

MISO-引腳D12

SCK-引腳D13

LCD屏幕

VCC-5v

GND-GND

SDA-引腳A4

SCL-引腳A5

瞬時開關:

VCC-5v(如上所示)

GND到1kΩ電阻(如上所示)

Pin 8 arduino(如上所示)

RGB LED:

將D7的220Ω電阻接至LED引腳(紅色)

將D6的220Ω電阻接至LED引腳(綠色)

公共(長線)- GND

伺服:

VCC-5v

GND-GND

信號-引腳D5

藍牙模塊:

VCC-5v

GND -GND

TX-D0(RX)

RX-D1(TX)

Fritzing圖:

步驟3:Pu一起努力

Arduino,藍牙模塊和瞬間開關+ RGB LED電路安裝在45mm的底盒中。我剛剛使用Blu-Tac將它們固定在原位,因為一旦固定在墻上就不會移動。我已經將開關,LED和電阻器焊接到了電路板上,并在電路板的任何一側創建了GND和VCC連接,還將放置一個用于12芯報警電纜的塊連接器,以連接RFID和LCD屏幕到arduino。蓋子上會鉆2個孔,以容納開關和引線。

RFID和LCD屏幕安裝在33mm的后蓋內,并開有一個插槽,用于LCD屏幕穿過。這些將通過12芯報警電纜和模塊連接器連接到arduino。

為使伺服器連接到門鎖,我3D打印了一個支架,該支架將擰緊到門上并連接到門上。

步驟4:代碼-(于2018年6月23日更新)

/*

* ----------------------------------------------------------------------------

* This sketch uses the MFRC522 library ; see https://github.com/miguelbalboa/rfid

* for further details and other examples.

*

* NOTE: The library file MFRC522.h has a lot of useful info. Please read it.

*

* This sketch show a simple locking mechanism using the RC522 RFID module.

* ----------------------------------------------------------------------------

* Typical pin layout used:

* -----------------------------------------------------------------------------------------

* MFRC522 Arduino Arduino Arduino Arduino Arduino

* Reader/PCD Uno Mega Nano v3 Leonardo/Micro Pro Micro

* Signal Pin Pin Pin Pin Pin Pin

* -----------------------------------------------------------------------------------------

* RST/Reset RST 9 5 D9 RESET/ICSP-5 RST

* SPI SS SDA(SS) 10 53 D10 10 10

* SPI MOSI MOSI 11 / ICSP-4 51 D11 ICSP-4 16

* SPI MISO MISO 12 / ICSP-1 50 D12 ICSP-1 14

* SPI SCK SCK 13 / ICSP-3 52 D13 ICSP-3 15

*

*/

#include

#include

#include

#include

#include

#include

#define RST_PIN 9 // Configurable, see typical pin layout above

#define SS_PIN 10

#define Green_LED 6 //pin for green “door unlocked” indicator LED

#define Red_LED 7 //pin for red “door locked” indicator LED

char array1[]=“ Swipe Your Tag”; //the string to print on the LCD

char array2[]=“ On The Reader.”;

char array3[]=“ Tag Accepted. ”;

char array4[]=“ Locking. ”;

char array5[]=“ Unlocking. ”;

int tim = 1; //the value of delay time

// initialize the library with the numbers of the interface pins

LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line

MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.

Servo myservo;

String read_rfid;

String ok_rfid_1=“94e68de2”;

String ok_rfid_2=“f5642a50”;

String ok_rfid_3=“4249622993c81”;

int addr = 1;

int eVal = 0;

int lockPosition;

int servo_position;

int BUTTON1 = 8;

void setup() {

Serial.begin(9600); // Initialize serial communications with the PC

while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)

SPI.begin(); // Init SPI bus

mfrc522.PCD_Init(); // Init MFRC522 card

{

lcd.init(); //initialize the lcd

lcd.backlight(); //open the backlight

lcd.begin(16,2);

}

pinMode(Green_LED, OUTPUT); //set all input/output pins, including whether they should be high (5v) or low (ground)

pinMode(Red_LED, OUTPUT);

digitalWrite(Green_LED, LOW);

digitalWrite(Red_LED, HIGH);

pinMode(BUTTON1,INPUT);

myservo.attach(5);

lockPosition = EEPROM.read(1);

// Serial.print(EEPROM.read(1));

if(lockPosition == 1){

digitalWrite(Red_LED, LOW);

digitalWrite(Green_LED, HIGH);

}

else {

digitalWrite(Red_LED, HIGH);

digitalWrite(Green_LED, LOW);

lockUnlock();

}

swipeText();

/*

* Dump a byte array as hex values to Serial.

*/

void dump_byte_array(byte *buffer, byte bufferSize) {

read_rfid=“”;

for (byte i = 0; i 《 bufferSize; i++) {

read_rfid=read_rfid + String(buffer[i], HEX);

}

}

void lockUnlock() { // locks or unlocks door

myservo.attach(5);

if(lockPosition == 1) {

lock2();

servo_position = 0;

myservo.write(servo_position);

digitalWrite(Red_LED, HIGH);

digitalWrite(Green_LED, LOW);

delay(3000);

lockPosition = 2;

eVal = lockPosition;

EEPROM.write(1,eVal);

// Serial.print(eVal);

}

else if(lockPosition == 2) {

lock1();

servo_position = 350;

myservo.write(servo_position);

digitalWrite(Red_LED, LOW);

digitalWrite(Green_LED, HIGH);

delay(3000);

lockPosition = 1;

eVal = lockPosition;

EEPROM.write(1,eVal);

// Serial.print(eVal);

}

myservo.detach();

}

void swipeText()

{

lcd.clear(); //Clears the LCD screen and positions the cursor in the upper-left corner.

lcd.setCursor(0,0); // set the cursor to column 15, line 0

for (int positionCounter1 = 0; positionCounter1 《 15; positionCounter1++)

{

lcd.print(array1[positionCounter1]); // Print a message to the LCD.

delay(tim); //wait for 250 microseconds

}

lcd.setCursor(0,1); // set the cursor to column 15, line 1

for (int positionCounter = 0; positionCounter 《 15; positionCounter++)

{

lcd.print(array2[positionCounter]); // Print a message to the LCD.

delay(tim); //wait for 250 microseconds

}

}

void lock1()

{

lcd.clear();

lcd.setCursor(0,0);

for (int positionCounter1 = 0; positionCounter1 《 15; positionCounter1++)

{

lcd.print(array3[positionCounter1]);

delay(tim);

}

lcd.setCursor(0,1);

for (int positionCounter1 = 0; positionCounter1 《 10; positionCounter1++)

{

lcd.print(array4[positionCounter1]);

delay(tim);

}

}

void lock2()

{

lcd.clear();

lcd.setCursor(0,0);

for (int positionCounter1 = 0; positionCounter1 《 15; positionCounter1++)

{

lcd.print(array3[positionCounter1]);

delay(tim);

}

lcd.setCursor(0,1);

for (int positionCounter1 = 0; positionCounter1 《 12; positionCounter1++)

{

lcd.print(array5[positionCounter1]);

delay(tim);

}

}

void loop() {

if(digitalRead(BUTTON1) == HIGH){

lockUnlock();

swipeText();

}

// Look for new cards

if ( ! mfrc522.PICC_IsNewCardPresent())

return;

// Select one of the cards

if ( ! mfrc522.PICC_ReadCardSerial())

return;

dump_byte_array(mfrc522.uid.uidByte, mfrc522.uid.size);

Serial.println(read_rfid);

if (read_rfid==ok_rfid_1) {

//ok, open the door.

lockUnlock();

swipeText();

}

//Add below as many “keys” as you want

if (read_rfid==ok_rfid_2) {

//also ok, open the door

lockUnlock();

swipeText();

}

//Add below as many “keys” as you want

if (read_rfid==ok_rfid_3) {

//also ok, open the door

lockUnlock();

swipeText();

}

}

聲明:本文內容及配圖由入駐作者撰寫或者入駐合作網站授權轉載。文章觀點僅代表作者本人,不代表電子發燒友網立場。文章及其配圖僅供工程師學習之用,如有內容侵權或者其他違規問題,請聯系本站處理。 舉報投訴
  • RFID
    +關注

    關注

    390

    文章

    6376

    瀏覽量

    241108
  • 藍牙
    +關注

    關注

    116

    文章

    6031

    瀏覽量

    173171
  • 門鎖
    +關注

    關注

    0

    文章

    48

    瀏覽量

    12061
收藏 人收藏

    評論

    相關推薦
    熱點推薦

    RFID電子標簽種類介紹大全 #RFID電子標簽 #rfid標簽

    RFID
    yueranxinxi
    發布于 :2025年05月16日 17:34:22

    RFID電子標簽(芯片)及RFID射頻識別技術深度解析 #RFID電子標簽

    RFID
    yueranxinxi
    發布于 :2025年05月08日 09:57:27

    智能門鎖與物聯網的結合

    ? ? ? 智能門鎖與物聯網結合的主要技術點。可能的方面包括通信協議(如Wi-Fi、藍牙、Zigbee)、數據安全、遠程管理、系統集成、低功耗設計等。 此外,數據安全是物聯網中的重要問題,比如
    的頭像 發表于 03-14 15:05 ?436次閱讀
    智能<b class='flag-5'>門鎖</b>與物聯網的結合

    門鎖觸摸芯片-選型指南-應用方案

    觸摸芯片是門禁門鎖系統中的核心部件,負責控制門鎖的開關、密碼輸入等功能,選擇合適的觸摸芯片對門鎖系統的穩定性和安全性至關重要。
    的頭像 發表于 02-17 15:41 ?335次閱讀
    <b class='flag-5'>門鎖</b>觸摸芯片-選型指南-應用方案

    羅德與施瓦茨產品在智能門鎖功耗測試中的應用

    何為智能門鎖呢?它也被稱為數字門鎖,是為了取代前門上的螺栓鎖而設計的,是一種支持Wi-Fi或藍牙的智能家居設備,用戶可以把家里的鑰匙留在家里,使用其他方式鎖門和開鎖。
    的頭像 發表于 02-13 13:29 ?717次閱讀
    羅德與施瓦茨產品在智能<b class='flag-5'>門鎖</b>功耗測試中的應用

    rfid溫度感應標簽應用演示 #rfid標簽 #溫度傳感標簽

    RFID
    深圳市融智興科技有限公司
    發布于 :2024年12月28日 15:52:10

    智能門鎖的工作原理和構成

    現在很多新房配置了智能門鎖,該產品的普及率不斷提升,未來市場前景非常廣闊。尤其在公寓和出租房市場,智能門鎖成為很多房子標配。智能門鎖在用戶安全性、智能識別和管理、便捷性等方面具有先天優勢,市場認可度不斷攀升。
    的頭像 發表于 12-06 11:27 ?1863次閱讀

    唯創知音智能門鎖后板鎖方案# 唯創知音# 智能門鎖

    智能門鎖
    WT-深圳唯創知音電子有限公司
    發布于 :2024年11月22日 17:28:04

    智能門鎖原理圖

    智能門鎖原理圖
    發表于 11-14 13:42 ?50次下載

    項目分享 | 小熊派DIY一款指紋門鎖

    今天小熊派就來手把手教大家如何利用小熊派開發板進行指紋門鎖制作,讓你擁有一款自己的指紋門鎖。指紋門鎖電路搭建及其工作原理: 首先,從整體架構來看看指紋
    發表于 10-09 13:55

    智能門鎖觸摸芯片_門鎖感應芯片_指紋密碼鎖芯片

    在飛速發展的科技時代,傳統的物理門鎖已無法滿足我們對安全和便捷的需求;智能門鎖成為保護家庭安全的必備裝備;觸摸芯片是智能門鎖的重要組件,能提供安全、便捷、高效的服務。 觸摸芯片可以替代傳統的
    的頭像 發表于 09-26 14:57 ?833次閱讀
    智能<b class='flag-5'>門鎖</b>觸摸芯片_<b class='flag-5'>門鎖</b>感應芯片_指紋密碼鎖芯片

    RFID屏蔽卡應用演示 #rfid標簽 #rfid卡 #屏蔽卡

    RFID
    深圳市融智興科技有限公司
    發布于 :2024年09月05日 16:46:59

    RFID抗液體試劑標簽應用案例演示 #rfid標簽 #抗液體試劑標簽 #RFID醫療標簽

    RFID
    深圳市融智興科技有限公司
    發布于 :2024年08月08日 15:03:27

    安全門鎖門鎖一開防護到位

    機械門鎖
    jf_31892182
    發布于 :2024年07月16日 13:40:17