From Waveshare Wiki
JetBot User Guide
- Log in JupyterLab
- Motor Driver
- Gamepad Control
- OLED Display
- Automatic Obstacle Avoiding
- Target Line Patrol
- Main Page
Step 1: Open Teleoperation Program
- Use Google or Firefox browser to log in to the website http://<jetbot_ip_address>:8888 to connect to the car [jetbot_ip_address is the ip displayed by the car, be careful to remove "<>"], open the folder on the left to "jetbot/notebooks/teleoperation/teleoperation" .ipynb” file
- Plug the gamepad receiver into the USB port of the computer. [Note] The receiver needs to be connected to the computer instead of the jetson nano. The gamepad needs to be connected to the device that opens the JupyterLab webpage.
- Open the https://html5gamepad.com/ webpage, check whether the controller is connected properly, and write down the INDEX value of the corresponding device; at this time, press the remote control and the corresponding value on the webpage will change accordingly.
- Note: INDEX=0 is a normal value, if the connection fails, it will display: No gamepad detected.
- Back in the demo, please odify the index to the actual value of the gamepad. Then determine the actual corresponding value of each button by pressing the button, and then you can set the function of the handle button by yourself.
- Tip: axes represent sliders, buttons represent squares.
- After clarifying the actual values corresponding to different keys, we can write a program to set the key functions by ourselves. For example, the X key represents buttons, the B key represents buttons, the Y key represents buttons, and the A key represents buttons, and the corresponding key value is assigned to the motor to control the car to move forward, back, left and right.
Step 2: Open the Camera
- Create an image window in the program with the format of jpeg, a resolution of 300 X 300, and display it on the current page.
- If there is an error, please check whether you have enabled the RPI camera interface.
- Quote the camera functions to call the camera. The image is outputted after running the program.
- When the "heartbeat" checks, the car will stop as soon as the network is failed.
- Control the car to take photos with buttons. You can choose the different buttons by changing it. Here we use buttons.
- After running the program, you can control the car by the gamepad. Asex is for the wheels on the left, Asex is for the wheel on the right, and button is the control for taking pictures. The image on the left shows the real-time image of the camera, the image on the right is the captured image, and the image is saved in the snapshots file.