An Android application for controlling a WALL-E style robot via Bluetooth using an intuitive control panel interface.
- Bluetooth Connectivity: Connect to paired Bluetooth devices using SPP (Serial Port Profile)
- Robot Control:
- Eye control (left/right)
- Head and arm movements
- Hand controls (left/right)
- Movement Controls:
- Directional movement (forward, backward, left, right)
- Stop and brake functions
- Front-back toggle
- Speed Management:
- Adjustable speed (0-180 range)
- Quick increment/decrement buttons (±5, ±10)
- Reset to default speed (65)
- Feature Toggles:
- Sound control
- Camera control
- LED control (left/right eye)
- Debug Mode: Real-time command monitoring
- Android Version: Android 7.0 (API 24) or higher
- Target SDK: Android 14 (API 36)
- Permissions:
BLUETOOTHandBLUETOOTH_ADMIN(for Android < 12)BLUETOOTH_CONNECTandBLUETOOTH_SCAN(for Android ≥ 12)
- Language: Kotlin
- UI Framework: Jetpack Compose with Material 3
- Architecture: Modern Android development practices
- Bluetooth: Classic Bluetooth with SPP UUID
- Build System: Gradle with Kotlin DSL
The app uses a JSON configuration file (control_config.json) to map UI controls to robot commands. You can customize the command mappings by editing:
app/src/main/assets/control_config.json
{
"bluetooth": {
"deviceAddress": "00:11:22:33:44:55"
},
"buttons": {
"control_left_eye": 24,
"control_right_eye": 25,
...
},
"toggles": {
"feature_sound": { "on": 7, "off": 7 },
...
}
}-
Clone this repository:
git clone https://github.com/yourusername/walle-app.git
-
Open the project in Android Studio
-
Sync Gradle dependencies
-
Connect your Android device or start an emulator
-
Run the app
-
Pair Your Device:
- First, pair your robot's Bluetooth module with your Android device through system settings
-
Launch the App:
- Open the WALL-E Control app
-
Connect:
- Tap the "蓝牙连接" (Bluetooth Connect) button
- Select your robot from the list of paired devices
- Wait for connection confirmation
-
Control Your Robot:
- Use the control buttons to move and operate the robot
- Adjust speed using the +/- buttons
- Toggle features on/off as needed
-
Disconnect:
- Tap "断开连接" (Disconnect) when finished
# Debug build
./gradlew assembleDebug
# Release build
./gradlew assembleRelease
# Run tests
./gradlew testwalle-app/
├── app/
│ └── src/
│ └── main/
│ ├── assets/
│ │ └── control_config.json # Command configuration
│ ├── java/com/example/walle_app/
│ │ ├── MainActivity.kt # Main activity
│ │ ├── bluetooth/
│ │ │ └── BluetoothClient.kt # Bluetooth communication
│ │ ├── control/
│ │ │ └── ControlConfig.kt # Config parsing
│ │ └── ui/
│ │ ├── ControlPanelScreen.kt # Main UI
│ │ └── theme/ # App theming
│ └── res/ # Resources
└── build.gradle.kts
- Ensure the robot is powered on and Bluetooth is enabled
- Check that the device is already paired in Android settings
- Verify you have granted Bluetooth permissions
- Go to Settings → Apps → WALL-E Control → Permissions
- Enable Bluetooth permissions
- Verify the connection status shows "连接成功" (Connected)
- Check the debug panel for sent commands
- Review
control_config.jsonfor correct command mappings
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Inspired by the WALL-E robot character
- Built with modern Android development tools and libraries
