A complete step counting system consisting of an ESP32 device with MPU6050 accelerometer and a React Native mobile application with native Bluetooth Low Energy (BLE) integration.
For detailed technical specifications, architecture overview, and implementation details, see: PROJECT_SPECIFICATION.md
- Node.js 18+
- Expo CLI
- Arduino IDE with ESP32 support
- XIAO ESP32-C3 board
- MPU6050 accelerometer sensor
-
Connect MPU6050 to ESP32:
- VCC → 3.3V
- GND → GND
- SDA → GPIO6
- SCL → GPIO7
-
Connect Reset Button:
- One terminal → GPIO2
- Other terminal → GND
-
Upload Arduino Code:
# Open arduino/step.ino in Arduino IDE # Install required libraries: BLEDevice, Wire # Upload to XIAO ESP32-C3
-
Install Dependencies:
npm install
-
Start Development Server:
npx expo start
-
Run on Device:
# iOS npx expo run:ios # Android npx expo run:android
- ESP32 (Arduino): Step detection using MPU6050 accelerometer
- React Native: Cross-platform mobile application
- TurboModules: High-performance native BLE integration
- CoreBluetooth: iOS Bluetooth Low Energy framework
- ✅ Real-time step counting
- ✅ Bluetooth Low Energy communication
- ✅ Automatic device discovery and connection
- ✅ Step counter reset functionality
- ✅ Debug logging and error handling
- ✅ Modern React Native architecture
- BLE Service UUID:
4fafc201-1fb5-459e-8fcc-c5c9c331914b - Characteristic UUID:
beefcafe-36e1-4688-b7f5-00000000000b - Sampling Rate: 50Hz
- Device Name: "Step-Sense"
- Bundle ID: com.expo.reactnativebluetoothesp32
- Minimum iOS: 13.0+
- Minimum Android: API 21+
├── app/ # Expo Router application
├── native/ # Native integration layer
├── ios/modules/StepBle/ # iOS BLE implementation
├── arduino/ # ESP32 Arduino code
└── assets/ # Application resources
- React Native 0.81.4 with New Architecture
- Expo SDK 54 with Expo Router
- TypeScript for type safety
- TurboModules for native performance
- CoreBluetooth for iOS BLE
- Fork the repository
- Create a feature branch
- Make your changes
- Test on both iOS and Android
- Submit a pull request
This project is licensed under the MIT License.