Skip to content

Commit 9a0a135

Browse files
Apply suggestions from feedback
Co-authored-by: GDJose <[email protected]>
1 parent abdd84d commit 9a0a135

File tree

1 file changed

+37
-20
lines changed
  • content/hardware/08.edu/solution-and-kits/alvik/tutorials/user-manual

1 file changed

+37
-20
lines changed

content/hardware/08.edu/solution-and-kits/alvik/tutorials/user-manual/user-manual.md

+37-20
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ difficulty: beginner
44
description: "Discover how to use and program Arduino® Alvik's robot"
55
tags:
66
- Robot
7-
author: "Paolo Cavagnolo, Pedro Miguel"
7+
author: "Paolo Cavagnolo, Pedro Miguel, Jose Garcia"
8+
89
---
910

1011
## Introduction
@@ -16,7 +17,8 @@ Powered by the Arduino® Nano ESP32, Alvik offers diverse learning paths through
1617

1718
In this tutorial, you will find useful information to get started, test, and maintain Alvik.
1819

19-
## What Is Alvik
20+
## What Is Alvik
21+
2022

2123
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...
2224

@@ -42,7 +44,8 @@ Inside the Arduino Alvik package you'll find the following items:
4244

4345
![Alvik bottom components](assets/down-components.png)
4446

45-
## The Brain
47+
## Alvik's Brain
48+
4649
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.
4750
![Alvik Brain](assets/alvik_brain.png)
4851

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

5861
![Nano ESP32 pinout](assets/esp-pinout.png)
5962

60-
## The Body
63+
## Alvik's Body
64+
6165
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.
6266

6367
![Alvik Body](assets/alvik_body.png)
@@ -70,7 +74,8 @@ The main core of the robot is the STM32 ARM Cortex-M4 32 Bit controller. It hand
7074

7175
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).
7276

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+
7479

7580
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.
7681
![Alvik STM32](assets/alvik_STM.png)
@@ -119,7 +124,8 @@ When fully charged it will stay GREEN.
119124

120125
***Don't confuse the RGB status LED with the power ON LED of the Nano ESP32, which is always green.***
121126

122-
## Sensors
127+
## Alvik's Sensors
128+
123129

124130

125131
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
152158

153159
Each button can be programmed to perform specific actions, providing more complex interface for user interaction.
154160

155-
### Distance Sensors
161+
### Distance Sensor
162+
156163

157164
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.
158165

@@ -163,7 +170,8 @@ The Arduino Alvik robot is equipped with a ToF (Time of Flight) 8x8 Array sensor
163170

164171
![Distance sensor position](assets/distanceSensor.png)
165172

166-
### Line Follower Sensor
173+
### Line Follower Sensors
174+
167175

168176
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.
169177

@@ -207,14 +215,16 @@ The Arduino Alvik robot is equipped with an onboard IMU (Inertial Measurement Un
207215

208216
![IMU axis reference](assets/imageIMU.png)
209217

210-
## Actuators
218+
## Alvik's Actuators
219+
211220

212221
| **Actuator name** | **Part name** | **Test program name** |
213222
|--------------------------|-------------------------|-----------------------|
214223
| Geared motors w/ encoder | GM12-N20VA-08255-150-EN | wheels_positions.py |
215224
| RGB LEDs | RGB LEDs | leds_settings.py |
216225

217-
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+
218228

219229
### Connectors
220230

@@ -273,8 +283,10 @@ It may happen that you used your Nano ESP32 for other projects than Alvik, or yo
273283

274284
2. Download the Alvik micropyton libraries
275285

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+
278290

279291
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
280292

@@ -407,7 +419,8 @@ while (True):
407419

408420
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.
409421

410-
## Deep Dive Programming Alvik
422+
## Deep Dive Programming Alvik
423+
411424

412425
### Controlling the Motors
413426

@@ -1079,7 +1092,8 @@ while True:
10791092
By following these steps, you can control the LEDs on the Arduino Alvik robot to display different colors and create various lighting effects.
10801093

10811094

1082-
## Talking With Other Machines!
1095+
## Talking With Other Devices!
1096+
10831097

10841098
### WiFi
10851099

@@ -1091,7 +1105,8 @@ The provided code will:
10911105
3. Serve a simple web page with buttons for directional control.
10921106
4. Move the robot in the specified direction when a button is pressed.
10931107

1094-
### Instructions
1108+
### Step by Step setup
1109+
10951110

10961111
1. Replace `Insert_SSID_Here` and `Password_Here` with your Wi-Fi credentials.
10971112
2. Upload the script to the Arduino Nano ESP32.
@@ -1259,12 +1274,12 @@ The provided code will:
12591274
2. Set up a callback function to handle incoming ESP-NOW messages.
12601275
3. Move the robot based on the received commands while buttons are pressed.
12611276

1262-
### Instructions
1277+
### Step by Step setup
1278+
12631279

12641280
1. Upload the receiver script to the Arduino Nano ESP32 on the Alvik robot.
12651281
2. Use another ESP32 device to send commands to the Alvik robot via ESP-NOW.
12661282

1267-
### Code
12681283

12691284
**Setting Up ESP-NOW on the Receiver**
12701285

@@ -1322,7 +1337,7 @@ while True:
13221337
sys.exit()
13231338
```
13241339

1325-
### Sending Commands
1340+
**Setting Up ESP-NOW on the Transmitter**
13261341

13271342
The following code can be used on another Alvik to send commands to the Alvik robot.
13281343

@@ -1395,13 +1410,15 @@ while True:
13951410
sys.exit()
13961411
```
13971412

1398-
### Receiver
1413+
**Receiver behaviour**
1414+
13991415

14001416
1. **Initializing ESP-NOW**: The code sets up the ESP32 as a Wi-Fi station and initializes ESP-NOW.
14011417
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.
14021418
3. **Registering the Callback**: The callback function is registered with ESP-NOW to ensure it gets called when a message is received.
14031419

1404-
### Sender
1420+
**Transmitter behaviour**
1421+
14051422

14061423
1. **Initializing ESP-NOW**: The code sets up the ESP32 as a Wi-Fi station and initializes ESP-NOW.
14071424
2. **Adding a Peer**: The MAC address of the receiver (Alvik robot) is added as a peer.

0 commit comments

Comments
 (0)