last updated: 2021-09-12
To work, we need hardware :), so each student builds his own rover. The rover is WLAN controlled by a computer or phone. We will use the rover or parts of it in our experiments and "just do it" exercises.
Most parts have to be mounted in the right direction. It is frustrating to unmount parts that are not mounted the right way, so stay concentrated and look twice at the pictures.
There are many sites and videos on the net, so I will not reinvent the wheel. Here is a link, explaining soldering: https://www.sciencebuddies.org/science-fair-projects/references/how-to-solder Read the 6 Tabs carefully an then just do it :). Exercise is the best teacher.
Respect the following seven points:
Download the latest Arduino software from Arduino.cc and extract the compressed folder. You can do this on a USB Stick. Now switch to the Arduino folder and create a folder with the name portable
inside the Arduino folder.
A portable installation allows to carry around your personal set of sketches, cores and libraries, to be used on any computer without affecting it with your files (see here).
To be able to use Arduino with ESP32 we add the ESP32 framework simply by adding a text line to to "File > Preferences > Additional Boards Manager URLs:
".
Enter the string
https://dl.espressif.com/dl/package_esp32_dev_index.json
into Additional Board Manager URLs:
field. You can add multiple URLs, separating them with commas. So we also add the string:
http://arduino.esp8266.com/stable/package_esp8266com_index.json
to be able to use ESP8266 devices.
Now open Boards Manager from Tools > Board: > Boards Manager...
, scroll down and install ESP32 and ESP8266 platform.
To use later Teensy Boards we download Teensyduino
from the pjrc homepage and follow the instructions on this page to install it..
After the installation we select our ESP32 board MH ET LIVE ESP32MiniKit
from Tools > Board
) and choose the right port under Port
.
Download the following .zip
-file and unzip it in your sketchbook folder:
In Arduino the C or C++ code files are named "sketch" have the extension .ino
and must be contained in a folder with the same name (without .ino
). In the same folder we have also the html page.
Download and uncompress the file rover_snyder1_both_esp_new_soft_with_websockets.zip
to your portable/sketchbook
folder. Open the file (File > Sketchbook > rover_snyder1_both_esp_new_soft_with_websockets
).
The Arduino library Websockets
from Markus Sattler has to be installed (Tools > Manage libraries... > search for websockets and scroll :)).
Change your SSID and Password in the sketch:
const char *WIFI_SSID = "btsiot01"; // AP settings
const char *WIFI_PASSWORD = "btsiot01"; // password must have min. 8 char.!!
Now we click on the Arduino Upload button to compile and upload our sketch.
Connected
, you start an Internet browser (best working with chrome!) and type the following URL: 192.168.168.168/
. Don't forget the slash ("/"). Now you see the two sliders to control your rover.The basic circuit is prepared to use two IR encoder and an I²C acceleration sensor.
Here are two optional circuits.
The first option is to add a relay and switch off the batteries after a certain amount of inactivity. For this we replace the original switch with a push-button.
The second optional circuit measures the battery voltage and current and sends the values over Serial or UDP.
They are possible because the ESP32 has more pins than an ESP8266. The relay is switched with GPIO33. Analog inputs are on GPIO34 and GPIO35.
You can activate the options in the software by uncommenting the corresponding line:
#ifndef ESP8266
//#define RELAY // uncomment if you use a relay (only ESP32)
//#define MEASURE // uncomment if you use measure current (only ESP32)
#endif // ifndef ESP8266
Link | Quality (/5) | Language | Topic | Length (approx. in min) | |
---|---|---|---|---|---|
https://youtu.be/GAyzaVSBvN0? | 3 | EN | Motor Driver 293d | 5 | |
https://youtu.be/jAmDliHcTJ0? | 2 | EN | Motor Driver 293d | 22 | |
https://youtu.be/Kb3Och2XC3A? | 2 | EN | Motor Driver 293d | 4 | |
https://youtu.be/KKoduge9V50? | 2 | EN | Motor Driver 293d | 8 | |
https://youtu.be/GPVC84D5ULw? | 4 | EN | DC Gear Motor | 10 | |
https://youtu.be/AqvHogekDI4? | 4 | EN | Basic Soldering technique | 5 | |
https://youtu.be/3a-bE1VlaU8? | 3 | EN | Assembly | 5 | |
https://youtu.be/oQQpAACa3ac? | 4,5 | EN | Assembly and Encoders | 50 |