KU SmartAccess is an iOS and Android mobile application that grants permission to users who have the right to access various areas in Kasetsart University. This project is split into 3 parts.
- smartaccess-terminal: Android-based mobile application that connects to the access point.
- smartaccess-mobile: Mobile application that integrates with the NisitKU and KULife applications.
- door-controller: Door controller that controls the hardware on the access point.
Before you begin, ensure you have met the following requirements:
- Node.js installed on your local machine.
- Expo CLI installed globally (Expo SDK 49)
npm install -g expo-cli
- Java SDK
- Android SDK (via Android Studio)
- Arduino IDE
- Expo GO (to use with
terminal-mobile
)
To install and set up the project, follow these steps:
-
Clone the repository:
https://github.com/Thanabardi/KU-SmartAccess.git
-
Installation & Usage
-
Terminal application (Android Only)
- Navigate into the project directory
cd smartaccess-terminal
- Install dependencies
npm install
- Install Java SDK on Expo CLI
- Create and add
local.properties
file inandroid
foldersdk.dir = /Users/<username>/Library/Android/sdk
- Run Prebuild
npx expo prebuild
- Connect to mobile phone through USB and ensure both devices share the same network
- Allow debug mode in mobile phone
- Create and add
- Usage
-
Start a development server
npx expo run:android
-
Setup application configuration and connect to the door controller via Bluetooth Low Energy Note: To set up via a QR code, ensure to follow this specified template and can make sure that it can parse into JSON format:
{ "appPassword":"", "logLimit":0, "isMultifactor":false, "apiKey":"", "apiSecret":"", "terminalKey":"", "tokenAPI":"", "participantsAPI":"", "faceRecogAPI":"" }
-
- Navigate into the project directory
-
Mobile Application (Android and iOS)
- Navigate into the project directory
cd smartaccess-mobile
- Install dependencies
npm install
- Usage
- Start a server for developing
or
npx expo start
npx expo start --tunnel
- Scan QR CODE with Expo GO on mobile phone Note: ensure both devices share the same network
- Start a server for developing
- Navigate into the project directory
-
Door Controller
- Navigate into the project directory
cd door-controller
- Install depencies
- Following Install KIDBRIGHT guide
- In library tab
- Adafruit_NeoPixel
- ArduinoJson
Note: BLE should come with the ESP32 hardware in arduino IDE
- Select port from computer that connect to Kidbright
- Port connection
- IN1: Contact sensor
- IN2: Button
- IN3: Light sensor
- IN4: Infrared distance sensor
- OUT1: 2 Relay Module
- OUT2: LED ring strip
- Select Verify & Upload
- Usage
- Press S1 button to sharing bluetooth (name:
Doorcontroller
)
- Press S1 button to sharing bluetooth (name:
- Navigate into the project directory
-