The MacQueen Remote Control App is an Android application designed to control a MacQueen Plus v2 robot via WiFi. The app enables users to send movement commands to the robot, toggle its LED light, and activate its sound feature. It also provides haptic feedback (vibration) for each button press to enhance user interaction.
- Robot Movement Control: Move the robot forward, backward, left, or right.
- LED Control: Toggle the robot's LED light on and off.
- Sound Control: Activate the robot's sound feature.
- Haptic Feedback: Vibration feedback for each button press.
- Android device running API level 21 or higher.
- MacQueen Plus v2 robot connected to the same WiFi network as the Android device.
-
Clone the Repository
git clone https://github.com/your-repository/macqueen-remote-control.git cd macqueen-remote-control
-
Open the Project
Open the project in Android Studio.
- Update Network Configuration
Ensure that your network_security_config.xml (referenced in AndroidManifest.xml) allows cleartext traffic if using HTTP:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">192.168.4.1</domain>
</domain-config>
</network-security-config>
- Add Permissions
Add the following permissions to your AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
Below is a link to my Code, it is important to understand the concepts of it and how it integrates and works with the Kotlin application, download and add this code to your microbit IDE:
https://makecode.microbit.org/S19893-69610-13178-56347
Tools and languages used.
Canva |
Kotlin |
React |
TypeScript |
- Build and Run
Build and run the app on your Android device.
Ensure the MacQueen Plus v2 robot is connected to the WiFi network. The robot should be reachable at http://192.168.4.1/. Adjust the baseUrl in MainActivity if your robot's IP address is different, The wifi SSID for my code is Spaza-Wifi
and the Password is I am speed
-
Network Requests: The app uses OkHttpClient to send HTTP requests to the robot for controlling various functions. Each button press triggers a specific command sent to the robot.
-
Haptic Feedback: The app utilizes the Vibrator service to provide haptic feedback when a button is pressed, enhancing the user experience.
-
Command Handling: The app handles commands to control robot movement, toggle the LED, and activate sound. The toggleLed method manages the LED state, switching it between on and off with each press.
-
Kotlin App: The app is built using Kotlin and follows standard Android practices for handling UI interactions and network communication.
-
MacQueen Plus v2 Robot: The MacQueen Plus v2 is a programmable robot that can be controlled over WiFi. It supports various commands for movement, LED control, and sound activation. Ensure the robot's firmware supports the commands sent by the app.
-
Robot Not Responding: Ensure the robot is connected to the same WiFi network as the Android device and that the IP address is correctly configured in the app.
-
Vibration Not Working: Verify that the Android device has vibration hardware and that the vibration permission is correctly set in the app's manifest.
-
Network Issues: Check network configurations and ensure that the network_security_config.xml permits cleartext traffic if using HTTP.
Phase | Description | Target Date |
---|---|---|
Phase 1 | Initial Development and Setup | July 2024 |
Phase 2 | Core Features Implementation | July 2024 |
Phase 3 | Testing and Debugging | August 2024 |
Phase 4 | Final Review and Release | September 2024 |
Phase 5 | Post-Release Support and Updates | September 2024 |
This project is licensed under the MIT License. See the LICENSE file for details.