Skip to content

osbrain/walle-app

Repository files navigation

WALL-E Robot Control App

An Android application for controlling a WALL-E style robot via Bluetooth using an intuitive control panel interface.

Features

  • 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

Screenshots

Control Panel

Requirements

  • Android Version: Android 7.0 (API 24) or higher
  • Target SDK: Android 14 (API 36)
  • Permissions:
    • BLUETOOTH and BLUETOOTH_ADMIN (for Android < 12)
    • BLUETOOTH_CONNECT and BLUETOOTH_SCAN (for Android ≥ 12)

Technology Stack

  • 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

Configuration

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

Configuration Structure

{
  "bluetooth": {
    "deviceAddress": "00:11:22:33:44:55"
  },
  "buttons": {
    "control_left_eye": 24,
    "control_right_eye": 25,
    ...
  },
  "toggles": {
    "feature_sound": { "on": 7, "off": 7 },
    ...
  }
}

Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/walle-app.git
  2. Open the project in Android Studio

  3. Sync Gradle dependencies

  4. Connect your Android device or start an emulator

  5. Run the app

Usage

  1. Pair Your Device:

    • First, pair your robot's Bluetooth module with your Android device through system settings
  2. Launch the App:

    • Open the WALL-E Control app
  3. Connect:

    • Tap the "蓝牙连接" (Bluetooth Connect) button
    • Select your robot from the list of paired devices
    • Wait for connection confirmation
  4. Control Your Robot:

    • Use the control buttons to move and operate the robot
    • Adjust speed using the +/- buttons
    • Toggle features on/off as needed
  5. Disconnect:

    • Tap "断开连接" (Disconnect) when finished

Building from Source

# Debug build
./gradlew assembleDebug

# Release build
./gradlew assembleRelease

# Run tests
./gradlew test

Project Structure

walle-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

Troubleshooting

Bluetooth Connection Failed

  • 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

Permission Denied

  • Go to Settings → Apps → WALL-E Control → Permissions
  • Enable Bluetooth permissions

Commands Not Working

  • Verify the connection status shows "连接成功" (Connected)
  • Check the debug panel for sent commands
  • Review control_config.json for correct command mappings

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments

  • Inspired by the WALL-E robot character
  • Built with modern Android development tools and libraries

About

An Android application for controlling a WALL-E style robot via Bluetooth using an intuitive control panel interface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages