This is the frontend of a mobile camera robot. The robot will stream the video using UV4l and the application will display the stream using a webview.
Full tutorial on instructables
A video demo is available on youtube
The raspberry pi and arduino project are located here
The application has only a main screen, in the left of the screen the streamming image is displayed. On the right there are the controls. The main control is a steering wheel, touch the steering wheel in the direction you wish the robot to move. Below the steering wheel there is a headlight button, touch it to toggle the light.
On the left side of the screen is a webview with the streammed image, you can adjust the image size in the webview by pinch.
In the top right corner there is a text like : "- Batt Connected".
-
First dash means no obstacles, if there is an obstacle in front or in the back of the robot it will be signaled with a small arrow pointing in front or in the back.
-
The "Batt" status is not implemented yet.
-
"Connected" means that mqtt server is connected so the robot can be used, the other possible value is "Disconnected"
- passwords.xml
<!--In the next lines mqttconfiguration needed-->
<string name="mqtt_endpoint">tcp://host:port</string>
<string name="mqtt_username">username</string>
<string name="mqtt_password">password</string>
<!--Next 3 lines containt endpoint and credentials for UV4l video streamming-->
<string name="stream_endpoint">http://host:port/stream</string>
<string name="stream_username">username</string>
<string name="stream_password">password</string>
- strings.xml
This "transmit_command_interval" value is a default and it's ok to leave it to 100 ms.
<!--how long between motor commands next transmissions (in milliseconds)-->
<string name="transmit_command_interval">100</string>