Time requirement: 30 minutes
Materials:
- XRP robot kit
- laptop with an internet connection
- mobile phone (optional)
Objective:
This tutorial will guide you though using the PestoLink-MicroPython module on your XRP robot. Once your robot is running the PestoLink code, you will be able to go to the pestol.ink web app and use it to drive your robot wirelessly.
Step 1, Robot code:
- Your robot needs to use MicroPython version 1.21 or later
If your MicroPython version is less than that, then follow these instructions to update it
- Upload pestolink.py to your XRP robot
Click here to download the PestoLink-MicroPython repository. After that, unzip it
Connect to your robot with the XRP code editor
In the XRP Code editor, go to file > Upload to XRP and select pestolink.py from the repo you downloaded
Save the file in the \lib folder like this: FINAL PATH: /lib/pestolink.py
- Upload pestolink_example.py to your XRP robot
In the XRP Code editor, go to file > Upload to XRP and select pestolink_example.py from the repo you downloaded
Save the file at the top level, so that FINAL PATH: /pestolink_example.py
Step 2, Pairing and connecting:
Open pestolink_example.py, change the robot_name string to what you want the robot to be named for Bluetooth pairing
Click the Run button in the top right
Go to PestoLink-Online. You will be faced with two options, go with PestoLink-Mobile for now but you can try the gamepad version later if you want
Press/click Connect BLE. A pairing menu will appear, find and select the robot name you chose. After the connection opens, you can now drive your robot!