Vision Guided Explorer Robot


Step 13: MakeCode: the Joystick Code



Yüklə 1,43 Mb.
Pdf görüntüsü
səhifə4/5
tarix26.05.2023
ölçüsü1,43 Mb.
#113333
1   2   3   4   5
Vision-Guided-Explorer-Robot

Step 13: MakeCode: the Joystick Code
You have to install the extension for the joystick (joystickbit)
Take into account to use the same group radio number in the code of the ExpBot to communicate between them
How it works:
The joystick to move left, right, forward and backwards the robot.
When we push the "D" button, the led ring will light on. It will change the colour between white, red,
green and blue each time we push it.
When we push the "E" button, the led ring will light o
If we keep pushed the "C" button, the servo will begin to move to the left side
If we keep pushed the "F" button, the servo will begin to move to the right side
You can download the code for the joystick from here
Vision Guided Explorer Robot: Page 19


Vision Guided Explorer Robot: Page 20


Step 14: ESP32 CAM
There are many tutorials on Internet about how to con gure the board.
Basically you have to do the following:
1. Download and install the version of your choice: Arduino IDE 1 or Arduino IDE 2
2. Once it’s running, go to “Menu Arduino IDE > Preferences > Settings > Additional board manager URLs”.
Add “https://dl.espressif.com/dl/package_esp32_index.json” and click OK.
3. Restart Arduino IDE and connect your board to a USB port.
4. Install the Esp32 library by going to “Tools > Board > Boards Manager > Search for Esp32 > Install Esp32
from Espressif Systems”.
5. Select the right board: “Tools > Board > ESP32 Arduino > AI Thinker ESP32-CAM”.
6. Select the right port by going to “Tools > Port” and then selecting your serial port
Now you’re ready to write your rst sketch and upload it to the Esp32-Cam
You can download the Arduino code from here
Once you have download the code, update your network credentials to connect the ESP32 board to the WLAN network
sent by your mobile phone (see how to do it below) and upload it to the board.
//Replace with your network credentials
const char* ssid = "Yourssid";
const char* password = "Yourpasswd";
How to see the images on your mobile phone?:
Vision Guided Explorer Robot: Page 21


First, you’ll need to go to the network settings on your phone. It’s called di erent things depending on
which phone you’re using (
Network & Internet

Connections) 
but it’ll be where you select your Wi-Fi
network. Inside, look for a tab that says 
hotspot
or 
tethering
. Share your´s phone internet connection
As soon as you ip the toggle to on, your phone will begin sending out its own WLAN network that other
devices can nd in their network list. By default, a random password will be assigned, but both that and
the name can be changed (network credentials).
Look for the ESP-32 cam device between all the devices connected to your WLAN network and copy the IP
address your network has assigned to it (second image).
Because the ESP32 board works as as server, open a web browser and type the IP address. You will see the
image is transmitting the ESP-32 (last image)
Vision Guided Explorer Robot: Page 22


Vision Guided Explorer Robot: Page 23


Vision Guided Explorer Robot: Page 24



Yüklə 1,43 Mb.

Dostları ilə paylaş:
1   2   3   4   5




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə