How to Control a Raspberry Pi Robot by Adeept APP

How to Control a Raspberry Pi Robot by Adeept APP

Method of controlling raspberry pi robot by Adeept mobile app:

For the robot we have updated the app control mode.

There is an appserver.py file in the server folder. After running it, you can open a server to monitor the connection of the mobile app.

If you have already installed a program for a robot product, just update its code:

Browse the root directory of the robot product in the Raspberry Pi terminal with the command cd [robot_name].

Update the project with sudo git pull.

If you want to set the appserver.py to run automatically, you can refer to the following methods:

With the command sudo nano startup.sh

Edit the startup.sh file and change the //PATH/server.py to //PATH/appserver.py

Press ctrl + x to exit, press y to save the changes, press enter to confirm.

Then it will automatically run the mobile terminal program the next time you turn it on.

5 Replies to “How to Control a Raspberry Pi Robot by Adeept APP”

  1. The appserver.py has bugs in it. Not sure how this passed debugging, but I fixed it by adding the turn_command in the move function in appCommand (starts at line 87). For forwardStart and backwardStart in appCommand, you have to add assigning a value for turn_command.

    def appCommand(data_input):
    global direction_command, turn_command, servo_command
    if data_input == ‘forwardStart\n’:
    direction_command = ‘forward’
    turn_command = ”
    move.move(speed_set, direction_command,turn_command)

    elif data_input == ‘backwardStart\n’:
    direction_command = ‘backward’
    turn_command = ”
    move.move(speed_set, direction_command,turn_command)

    elif data_input == ‘leftStart\n’:
    turn_command = ‘left’
    servo.turnLeft()
    move.move(speed_set, direction_command,turn_command)

    elif data_input == ‘rightStart\n’:
    turn_command = ‘right’
    servo.turnRight()
    move.move(speed_set, direction_command,turn_command)

  2. I got this to work right away BUT when I try to turn, I get an error.
    Traceback (most recent call last):
    File “appserver.py”, line 248, in
    app_ctrl()
    File “appserver.py”, line 244, in app_ctrl
    appCommand(data)
    File “appserver.py”, line 95, in appCommand
    move.move(speed_set, direction_command)
    TypeError: move() missing 1 required positional argument: ‘turn’

  3. I have built the RaspClaws robot and setup the software on a Raspberry Pi 4B. I have installed the Adeept Remote Control Android app, stopped server.py on my Raspberry Pi 4B, started appserver.py (says waiting for connection). Then when I enter the correct IP address and Port number (10123) – the mobile app crashes (no error messages shown). I have tried this numerous times, restarted the Raspberry Pi and even tried running appserver.py while server.py is running

    Can you help?

Leave a Reply