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
+115-63
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,16 @@ In this tutorial, you will find useful information to get started, test, and mai
20
20
21
21
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
22
23
+
### Unboxing
24
+
25
+

26
+
27
+
Inside the Arduino Alvik package you'll find the following items:
@@ -219,11 +229,7 @@ With its line follower sensors, Alvik can navigate along predefined paths marked
219
229
The goal is to present the sensors and actuators of the Alvik robot, highlighting their key features and uses without delving into programming specifics.
220
230
221
231
222
-
## Alvik First Use
223
-
224
-
### Unboxing
225
-
226
-

232
+
## Alvik's Firmware
227
233
228
234
To get started to play with Alvik you will need the following hardware and software:
229
235
@@ -241,103 +247,149 @@ To get started to play with Alvik you will need the following hardware and softw
241
247
- Operating Systems: All the major Operating Systems are supported
242
248
-[Arduino Lab for Micropython](https://labs.arduino.cc/en/labs/micropython)
243
249
244
-
### ESP32 MicroPython Firmware
250
+
### Updating Alvik's Brain (Nano ESP32)
245
251
246
-
Download and install the [Arduino Lab for MicroPython](https://labs.arduino.cc/en/labs/micropython), if you are able to connect the Arduino Nano ESP32 it means that your board is ready. You have to see the **CONNECTED** yellow label at the bottom.
252
+
It may happen that you used your Nano ESP32 for other projects than Alvik, or you need to replace it. In order to make your Nano ESP32 work with Alvik, there are few steps needed:
1. Alvik micropython libraries from the [Alvik repository](https://github.com/arduino/arduino-alvik-mpy/tree/main)
259
+
2. ucPack libraries from the [ucPack repository](https://github.com/arduino/ucPack-mpy/tree/main)
253
260
254
-
### How to Upload Libraries
261
+
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
255
262
256
-
You will find the latest instructions directly in the [repository](https://github.com/arduino/arduino-alvik-mpy/releases). Here are the main steps:
263
+

257
264
258
-
1. Prepare file
265
+
4. Make sure your Alvik is OFF, connect it to your computer and then, turn it ON
259
266
260
-
Download the repository and extract all the files in a specific folder that will become the main Alvik folder.
267
+

261
268
262
-
2. Remove old files
269
+
5. Connect your Alvik to the Arduino Labs for micropython and open the "lib"
270
+

263
271
264
-
Open **Arduino Lab for MicroPython** and **connect** Alvik. Then:
272
+
6. Select the "Arduino-alvik" and move it inside the "lib" folder in your Alvik.
273
+

265
274
266
-
Click on the `files` icon
275
+
7. Go back to the main folder and select the "ucPack-mpy-main" folder and move it next to the arduino_alvik inside the "lib" folder in your Nano ESP32.
276
+

267
277
268
-
Click on a `files name`in the bottom left explorer windows.
278
+
8. Now go back to the main root of the files system on the Nano ESP32. Then in your local folder navigate to the examples folder once there, select the following files and move them to the main folder of the ESP32.
269
279
270
-
Click on the `bin` icon to delete it
280
+
1. demo.py
281
+
2. hand_follower.py
282
+
3. line_follower.py
283
+
4. main.py
284
+
5. touch_move.py
271
285
272
-
Repeat for all the files, from all folders
286
+

273
287
274
-

288
+
With this last step, your Nano ESP32 has been set up with the Alvik out of the box experience and is ready to be used.
275
289
276
-
3. Install mpremote
290
+
### Updating Alvik's Body (STM32)
277
291
278
-
[mpremote](https://docs.micropython.org/en/latest/reference/mpremote.html) is a Python module needed to upload files on the Nano ESP32. The minimum suggested mpremote release is 1.22.0. Be sure to have Python installed before proceeding!
292
+
1. Download the [pre-compiled firmware](https://github.com/arduino-libraries/Arduino_AlvikCarrier/releases/latest) from the [Alvik Carrier GitHub reposiitory](https://github.com/arduino-libraries/Arduino_AlvikCarrier)
This step will download a "firmware_x_x_x.bin" file, save it in your Alvik folder
281
295
282
-
Depending on how you configure Python on your machine.
296
+
2. Connect your Alvik to the Computer and to the Arduino Labs for Micropython. Then, go to the files tab and navigate to the folder where you stored the "firmware_x_x_x.bin"
297
+

283
298
284
-
4. Install library
285
-
Run the following line to upload all files and download the dependencies needed to run the Arduino Alvik MicroPython library.
299
+
3. Let's move now the "firmware_x_x_x.bin" to the main root.
300
+

286
301
287
-
Linux
288
-
`$ ./install.sh -p <device port>`
302
+
4. Turn ON your alvik, go to the Editor tab and tun the following commands by typing them and clicking on the "Play" button
289
303
290
-
Windows
291
-
`install.bat -p <device port>`
304
+
```
305
+
from arduino_alvik import update_firmware
306
+
307
+
update_firmware('./firmware_1_0_0.bin')
308
+
```
292
309
310
+

293
311
294
-
The `install.*` script will copy all the needed files into your Alvik.
295
-
The `<device port>` is the name of the USB port that your computer assigned to the Nano ESP32.
312
+
After executing these commands, there will be updates of the process on the prompt, once the process finishes, the firmware of your alvik will be updated.
296
313
297
-
There are several ways to find it, depending on your OS, for example:
298
-
- You can use the Arduino IDE to discover the port, [follow this guide to know more](https://support.arduino.cc/hc/en-us/articles/4406856349970-Select-board-and-port-in-Arduino-IDE).
299
-
- You can check it by using the Arduino Lab for MicroPython by clicking `Connect` after connecting Alvik with the USB cable.
300
-
- You can check the list of the USB devices attached to your PC.
314
+
### Hello Alvik! Your first program!
301
315
302
-
### How to Upload Firmware
316
+
Alvik is intended to be programmed with MicroPyton. We recommend you to install the [Arduino Lab for MicroPython](https://labs.arduino.cc/en/labs/micropython) editor.
303
317
304
-
1. Download the latest [pre-compiled firmware](https://github.com/arduino-libraries/Arduino_AlvikCarrier/releases/latest) and place it inside Alvik's project folder.
318
+
Now that all the previous steps have been set, let's see how to create custom programs for Alvik to move forward until detecting an object in front of it, Alvik will detect it, dodge it and continue on its way.
305
319
306
-
2. Go into `utilities` folder and run the `flash_firmware` script:
**1. **Create an Alvik folder in your computer and set it as the path of the Arduino Lab for MicroPython IDE
310
322
323
+

2. Click on the `path string` in the bottom right explorer windows.
324
-
3. Click on the `file name` of the example you choose
325
-
4. Click on the `play button`
374
+
**4. **Connect Alvik to your PC using the cable included in the box, under the tray.
326
375
327
-

376
+

328
377
378
+
***Make sure that Alvik is OFF before connecting it to your computer.***
329
379
330
-
## Program Alvik!
380
+
**5. **Once Alvik is connected to the PC, connect it to the Arduino Lab for MicroPython and open the _main.py_ file in the Alvik folder. Once the file is opened let's replace the `import demo` statement by `import obstacle_avoider`.
331
381
332
-

382
+

333
383
334
-
In order for Alvik to work properly three things have to be set correctly:
384
+
***If you want to go back to the out of the box experience where you could select between reg, green and blue programs, you only need to modify the _main.py_ again replacing the `import obstacle_avoider` statement by `import demo`***
335
385
336
-
1. The Nano ESP32 needs the [MicroPython firmware](https://labs.arduino.cc/en/labs/micropython) on it.
337
-
2. The [latest libraries](https://github.com/arduino/arduino-alvik-mpy/releases) have to be placed in the Nano ESP32.
338
-
3. The [latest firmware](https://github.com/arduino-libraries/Arduino_AlvikCarrier/releases) has to be uploaded to the STM32 microcontroller.
386
+
**6. **The last step is to move the _obstacle_avoider.py_ file from the local repository to Alvik's memory.
339
387
340
-
Alvik comes with a preinstalled version of libraries and firmware, but in case you want to upgrade it or if something happens and you mess things up, here is the guide to reinstall both libraries and firmware.
388
+

389
+
390
+
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.
391
+
392
+
## Deep dive programming Alvik
341
393
342
394
### Controlling the Motors
343
395
@@ -761,18 +813,18 @@ In this example, the robot uses its line follower sensor array to navigate along
0 commit comments