A modern React Native app to control an HC-05 Bluetooth-enabled servo door lock and LED. Scan for nearby devices, connect, and toggle the lock or LED with a sleek, interactive interface.
![]() Bluetoothconnection Screen |
![]() LED Control Screen |
- Scan and connect to Bluetooth Classic devices (HC-05)
- Control a servo motor (door lock) and LED remotely
- Robust connection handling and error feedback
- Modern, dark-themed UI with accessibility features
BluetoothLEDApp/
├── App.tsx
├── app.json
├── eas.json
├── package.json
├── tsconfig.json
├── useBLE.ts
├── useBluetoothClassic.ts
├── assets/
│ ├── adaptive-icon.png
│ ├── favicon.png
│ ├── icon.png
│ ├── splash-icon.png
│ └── fonts/
│ └── Orbitron-Regular.ttf
├── android/
│ ├── app/
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── ...
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── local.properties
│ └── settings.gradle
└── ...
- Install dependencies:
npm install
- Start development:
npx expo start
- Build APK (EAS):
eas build -p android --profile production
#include <Servo.h>
Servo myServo;
char data = 0;
int currentPos = 0;
void setup() {
myServo.attach(9);
myServo.write(0);
currentPos = 0;
Serial.begin(9600);
}
void loop() {
if (Serial.available()) {
data = Serial.read();
if (data == '1' && currentPos != 90) {
myServo.write(90);
currentPos = 90;
delay(300);
} else if (data == '0' && currentPos != 0) {
myServo.write(0);
currentPos = 0;
delay(300);
}
}
}
Educational purpose