You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/08.edu/solution-and-kits/alvik/tutorials/user-manual/user-manual.md
+37-20
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@ difficulty: beginner
4
4
description: "Discover how to use and program Arduino® Alvik's robot"
5
5
tags:
6
6
- Robot
7
-
author: "Paolo Cavagnolo, Pedro Miguel"
7
+
author: "Paolo Cavagnolo, Pedro Miguel, Jose Garcia"
8
+
8
9
---
9
10
10
11
## Introduction
@@ -16,7 +17,8 @@ Powered by the Arduino® Nano ESP32, Alvik offers diverse learning paths through
16
17
17
18
In this tutorial, you will find useful information to get started, test, and maintain Alvik.
18
19
19
-
## What Is Alvik
20
+
## What Is Alvik
21
+
20
22
21
23
Alvik is a robot with two controllers and a wide range of sensors and actuators. The main controller is the Arduino Nano ESP32 attached to the top of the robot while there is an STM32 controller integrated into the robot that takes care of the low-level commands such as reading the sensors and moving the motors. It has been designed for STEAM education, making it an ideal tool for learning programming, Robotics, IoT, Artificial Intelligence...
22
24
@@ -42,7 +44,8 @@ Inside the Arduino Alvik package you'll find the following items:
The brain of the Alvik robot is the Nano ESP32, which is the central component we program to run the logic and make decisions. It is extremely important because it processes all the high-level commands and controls the overall operation of the robot. However, instead of directly moving the motors or reading sensors, it communicates with the STM32 (the body) to execute these actions. The Nano ESP32 gives orders to the STM32 to move, read sensors, or report status, allowing the robot to make informed (or better yet, as informed as we program it) decisions and run tasks and routines using this information.
47
50

48
51
@@ -57,7 +60,8 @@ Please note that when using MicroPython the pin number reflects the GPIO on the
57
60
58
61

59
62
60
-
## The Body
63
+
## Alvik's Body
64
+
61
65
Using the same analogy, the body of the Alvik robot includes everything else from the sensors and motors to the connectors supporting external modules and, of course, the STM32, which acts like the nervous system of the robot. Just as the human nervous system transmits signals between the brain and various parts of the body, the STM32 transmits commands and collects data from the robot's components. When the Nano ESP32, acting as the brain, sends commands, the STM32 executes these low-level operations, such as moving the motors, flashing the LEDs, or interacting with external devices. The STM32 is essential for carrying out the detailed actions based on the high-level instructions from the Nano ESP32, ensuring that the robot's movements and functions are performed accurately.
62
66
63
67

@@ -70,7 +74,8 @@ The main core of the robot is the STM32 ARM Cortex-M4 32 Bit controller. It hand
70
74
71
75
You can learn more about the available functions for Alvik in the following [Alvik's API Documentation](https://docs.arduino.cc/tutorials/alvik/api-overview).
72
76
73
-
***Although Alvik's "out of the box" experience is designed in micropython, there are C++ APIs that allow you to program Avlik in the Arduino IDE, these APIs are 1 to 1 compatible with the micropython APIs, which means that the API overview will be interesting for both micropython and C++ programs.***
77
+
***Although Alvik's "out of the box" experience is designed in micropython, there are C++ APIs that allow you to program Avlik in the Arduino IDE, these APIs are 1 to 1 compatible with the micropython APIs, which means that the [Alvik's API Documentation](https://docs.arduino.cc/tutorials/alvik/api-overview) will give you information for both micropython and C++ programming experiences.***
78
+
74
79
75
80
The latest firmware of the STM32 can be found at [this link](https://github.com/arduino-libraries/Arduino_AlvikCarrier/releases), and [here](#how-to-upload-firmware) is the guide to flash it.
76
81

@@ -119,7 +124,8 @@ When fully charged it will stay GREEN.
119
124
120
125
***Don't confuse the RGB status LED with the power ON LED of the Nano ESP32, which is always green.***
121
126
122
-
## Sensors
127
+
## Alvik's Sensors
128
+
123
129
124
130
125
131
Alvik includes a set of different sensors listed below, all connected to the STM32 and accessible through the [APIs](https://docs.arduino.cc/tutorials/alvik/api-overview). For each sensor there is test example program that you can find in the _examples_ folder in [this repository](https://github.com/arduino/arduino-alvik-mpy/tree/main/examples) for micropython and in [this repository](https://github.com/arduino-libraries/Arduino_AlvikCarrier/tree/main/examples) for C++.
@@ -152,7 +158,8 @@ The Arduino Alvik robot is equipped with seven capacitive touch buttons. These b
152
158
153
159
Each button can be programmed to perform specific actions, providing more complex interface for user interaction.
154
160
155
-
### Distance Sensors
161
+
### Distance Sensor
162
+
156
163
157
164
The Arduino Alvik robot is equipped with a ToF (Time of Flight) 8x8 Array sensor, specifically the VL53L7CX, which can measure distances up to 350 cm. These distance sensors help the robot detect obstacles and measure the distance to objects in its environment. The sensor is integrated into the front PCB of the robot.
158
165
@@ -163,7 +170,8 @@ The Arduino Alvik robot is equipped with a ToF (Time of Flight) 8x8 Array sensor
The Arduino Alvik robot is equipped with line follower sensors that help it detect and follow lines on the ground. This is useful for applications where the robot needs to navigate along predefined paths. The line follower array consists of three phototransistors and five infrared LEDs, mounted on the front PCB.
169
177
@@ -207,14 +215,16 @@ The Arduino Alvik robot is equipped with an onboard IMU (Inertial Measurement Un
207
215
208
216

209
217
210
-
## Actuators
218
+
## Alvik's Actuators
219
+
211
220
212
221
|**Actuator name**|**Part name**|**Test program name**|
The RGB LEDs can be used for visual feedback and can be programmed to display various colors and patterns. The LEDs take in **boolean** values for each color meaning that combinations are possible by setting each color **on** or **off** insteadof controlling intensity.
226
+
The RGB LEDs can be used for visual feedback and can be programmed to display various colors and patterns. The LEDs take in **boolean** values for each color meaning that combinations are possible by setting each color **on** or **off** .
227
+
218
228
219
229
### Connectors
220
230
@@ -273,8 +283,10 @@ It may happen that you used your Nano ESP32 for other projects than Alvik, or yo
273
283
274
284
2. Download the Alvik micropyton libraries
275
285
276
-
Alvik micropython libraries from the [Alvik repository](https://github.com/arduino/arduino-alvik-mpy/tree/main)
277
-
ucPack libraries from the [ucPack repository](https://github.com/arduino/ucPack-mpy/tree/main)
286
+
- Alvik micropython libraries from the [Alvik repository](https://github.com/arduino/arduino-alvik-mpy/tree/main)
287
+
288
+
- ucPack libraries from the [ucPack repository](https://github.com/arduino/ucPack-mpy/tree/main)
289
+
278
290
279
291
3. Unzip both of the downloaded libraries in a single "Alvik" folder, open the Arduino Lab for MicroPython, go to the "files" tab and set the path to the unzipped folder on the Arduino Lab for Micropython
280
292
@@ -407,7 +419,8 @@ while (True):
407
419
408
420
You are now all set, disconnect Alvik from the computer, put some obstacles around Alvik, turn it ON and see how Alvik detects them and turns to avoid them.
409
421
410
-
## Deep Dive Programming Alvik
422
+
## Deep Dive Programming Alvik
423
+
411
424
412
425
### Controlling the Motors
413
426
@@ -1079,7 +1092,8 @@ while True:
1079
1092
By following these steps, you can control the LEDs on the Arduino Alvik robot to display different colors and create various lighting effects.
1080
1093
1081
1094
1082
-
## Talking With Other Machines!
1095
+
## Talking With Other Devices!
1096
+
1083
1097
1084
1098
### WiFi
1085
1099
@@ -1091,7 +1105,8 @@ The provided code will:
1091
1105
3. Serve a simple web page with buttons for directional control.
1092
1106
4. Move the robot in the specified direction when a button is pressed.
1093
1107
1094
-
### Instructions
1108
+
### Step by Step setup
1109
+
1095
1110
1096
1111
1. Replace `Insert_SSID_Here` and `Password_Here` with your Wi-Fi credentials.
1097
1112
2. Upload the script to the Arduino Nano ESP32.
@@ -1259,12 +1274,12 @@ The provided code will:
1259
1274
2. Set up a callback function to handle incoming ESP-NOW messages.
1260
1275
3. Move the robot based on the received commands while buttons are pressed.
1261
1276
1262
-
### Instructions
1277
+
### Step by Step setup
1278
+
1263
1279
1264
1280
1. Upload the receiver script to the Arduino Nano ESP32 on the Alvik robot.
1265
1281
2. Use another ESP32 device to send commands to the Alvik robot via ESP-NOW.
1266
1282
1267
-
### Code
1268
1283
1269
1284
**Setting Up ESP-NOW on the Receiver**
1270
1285
@@ -1322,7 +1337,7 @@ while True:
1322
1337
sys.exit()
1323
1338
```
1324
1339
1325
-
### Sending Commands
1340
+
**Setting Up ESP-NOW on the Transmitter**
1326
1341
1327
1342
The following code can be used on another Alvik to send commands to the Alvik robot.
1328
1343
@@ -1395,13 +1410,15 @@ while True:
1395
1410
sys.exit()
1396
1411
```
1397
1412
1398
-
### Receiver
1413
+
**Receiver behaviour**
1414
+
1399
1415
1400
1416
1.**Initializing ESP-NOW**: The code sets up the ESP32 as a Wi-Fi station and initializes ESP-NOW.
1401
1417
2.**Callback Function**: A callback function `on_receive_msg` is defined to handle incoming messages. This function decodes the message and moves the robot based on the received command.
1402
1418
3.**Registering the Callback**: The callback function is registered with ESP-NOW to ensure it gets called when a message is received.
1403
1419
1404
-
### Sender
1420
+
**Transmitter behaviour**
1421
+
1405
1422
1406
1423
1.**Initializing ESP-NOW**: The code sets up the ESP32 as a Wi-Fi station and initializes ESP-NOW.
1407
1424
2.**Adding a Peer**: The MAC address of the receiver (Alvik robot) is added as a peer.
0 commit comments