嘿!您似乎在 United States,您想使用我们的 English 网站吗?
Switch to English site
Skip to main content

FutureWard : Raspberry Pi 簡易門禁系統 (前置篇)

本系列文章將使用Raspberry Pi 3作為主要的控制電腦,並且連結RFID讀卡機,刷卡後立即至Google表單比對資料,如果資料正確,將使用伺服馬達開啟門閂。

安裝適當的作業系統,官方提供簡易安裝的作業系統給使用者下載
https://www.raspberrypi.org/downloads/noobs/

*Node.js - 此套件負責在UpBoard建立一個伺服器,進行網頁的處理與跨平台的通訊。

在指令畫面下輸入
sudo apt-get install nodejs
sudo apt-get install npm

完成後輸入,以確認是否安裝完成
node --version

*Python - 此套件負責跨平台的程式通訊,能夠讓不同的程式語言相互工作。Linux系統應該已裝上此套件,可以輸入 python2  —version來確認。

*Libmraa - 此nodejs插件負責控制Raspberry PiGPIO腳位

 

安裝完Node.js後,在指令畫面下輸入

npm install -g mraa

 

*node-static -  是 http 提供靜態文件服務的 nodejs模組 (因為使用nodejs, 無法讓html直接存取本地硬碟)

安裝完Node.js後,在指令畫面下輸入

npm install -g node-static

 

325%E4%B8%8D%E5%B0%B1%E6%98%AF%E5%80%8B%E9%96%80_180507_0003_f8525b5a863a91c8345ebb211c8cce4499d36bb9.jpg

Taiwan's largest makerspace + coworking space, located in central Taipei, where everyone can realize their dreams & start their future. By sharing tools & resources in an aspirational space that is conducive to learning & collaborating, we strive to foster a creative & supportive community.