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
+19-40
Original file line number
Diff line number
Diff line change
@@ -4,9 +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"
7
+
author: "Paolo Cavagnolo Pedro Miguel"
8
8
---
9
-
# Arduino® Alvik User Manual
10
9
11
10
## Introduction
12
11
Arduino® Alvik is a powerful and versatile robot specifically designed for programming and STEAM education.
@@ -303,7 +302,6 @@ Open **Arduino Lab for MicroPython** and **connect** Alvik. Then:
303
302
Depending on how you configure Python on your machine.
304
303
305
304
4. Install library
306
-
307
305
Run the following line to upload all files and download the dependencies needed to run the Arduino Alvik MicroPython library.
308
306
309
307
Linux
@@ -314,9 +312,9 @@ Windows
314
312
315
313
316
314
The `install.*` script will copy all the needed files into your Alvik.
315
+
The `<device port>` is the name of the USB port that your computer assigned to the Nano ESP32.
317
316
318
-
The `<device port>` is the name of the USB port that your computer assigned to the Nano ESP32. There are several ways to find it, depending on your OS, for example:
319
-
317
+
There are several ways to find it, depending on your OS, for example:
320
318
- 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).
321
319
- You can check it by using the Arduino Lab for MicroPython by clicking `Connect` after connecting Alvik with the USB cable.
322
320
- You can check the list of the USB devices attached to your PC.
@@ -365,7 +363,7 @@ Alvik comes with a preinstalled version of libraries and firmware, but in case y
365
363
366
364
Movement is one of Alvik's main features, making it essential to have a variety of methods to control Alvik's motors. This flexibility allows you to use different control methods depending on your needs, whether it's for precise movement or simple speed control.
367
365
368
-
**Power Over Distance/Time**
366
+
**Power Over Distance/Time**
369
367
370
368
You can set the speed of Alvik's motors directly and let it run for a specific amount of time or distance. This method is straightforward and useful for simple tasks where precise control isn't necessary.
The `move` function moves the robot by a given distance.
413
411
@@ -424,7 +422,7 @@ sleep_ms(2000) # Move forward 50 cm in 2 seconds
424
422
alvik.brake()
425
423
```
426
424
427
-
**Drive**
425
+
**Using Drive**
428
426
429
427
You can also specify the power and time for Alvik's motors in terms of degrees per second or centimeters per second. This method is useful for tasks requiring fine-tuned control of the robot's speed and direction.
430
428
@@ -433,10 +431,10 @@ You can also specify the power and time for Alvik's motors in terms of degrees p
433
431
The `drive` function drives the robot by setting the linear and angular velocity.
434
432
435
433
**Inputs:**
436
-
-`linear_velocity`: Speed of the robot.
437
-
-`angular_velocity`: Speed of the wheels.
438
-
-`linear_unit`: Unit of linear velocity (default is 'cm/s').
439
-
-`angular_unit`: Unit of rotational speed of the wheels (default is 'deg/s').
434
+
`linear_velocity`: Speed of the robot.
435
+
`angular_velocity`: Speed of the wheels.
436
+
`linear_unit`: Unit of linear velocity (default is 'cm/s').
437
+
`angular_unit`: Unit of rotational speed of the wheels (default is 'deg/s').
440
438
441
439
**Example Usage:**
442
440
@@ -532,60 +530,43 @@ The Arduino Alvik robot is equipped with several touch buttons that can be used
532
530
533
531
The `[get_touch_any](https://docs.arduino.cc/tutorials/alvik/api-overview/#get_touch_any)` function returns true if any of the buttons is pressed.
534
532
535
-
**Outputs:**
536
-
`touch_any`: true if any button is pressed, false otherwise.
537
533
538
534
- Detect the **OK** button pressed.
539
535
540
536
The `[get_touch_ok](https://docs.arduino.cc/tutorials/alvik/api-overview/#get_touch_ok)` function returns true if the OK button is pressed.
541
537
542
-
**Outputs:**
543
-
`touch_ok`: true if OK button is pressed, false otherwise.
544
538
545
539
- Detect the **Cancel** button pressed.
546
540
547
541
The `[get_touch_cancel](https://docs.arduino.cc/tutorials/alvik/api-overview/#get_touch_cancel)` function returns true if the Cancel button is pressed.
548
542
549
-
**Outputs:**
550
-
`touch_cancel`: true if Cancel button is pressed, false otherwise.
551
543
552
544
- Detect the **Center** button pressed.
553
545
554
546
The `[get_touch_center](https://docs.arduino.cc/tutorials/alvik/api-overview/#get_touch_center)` function returns true if the Center button is pressed.
555
547
556
-
**Outputs:**
557
-
`touch_center`: true if Center button is pressed, false otherwise.
558
548
559
549
- Detect the **Up** button pressed.
560
550
561
551
The `[get_touch_up](https://docs.arduino.cc/tutorials/alvik/api-overview/#get_touch_up)` function returns true if the Up button is pressed.
562
552
563
-
**Outputs:**
564
-
`touch_up`: true if Up button is pressed, false otherwise.
565
553
566
554
- Detect the **Left** button pressed.
567
555
568
556
The `[get_touch_left](https://docs.arduino.cc/tutorials/alvik/api-overview/#get_touch_left)` function returns true if the Left button is pressed.
569
557
570
-
**Outputs:**
571
-
`touch_left`: true if Left button is pressed, false otherwise.
572
558
573
559
- Detect the **Down** button pressed.
574
560
575
561
The `[get_touch_down](https://docs.arduino.cc/tutorials/alvik/api-overview/#get_touch_down)` function returns true if the Down button is pressed.
576
562
577
-
**Outputs:**
578
-
`touch_down`: true if Down button is pressed, false otherwise.
579
563
580
564
- Detect the **Right** button pressed.
581
565
582
566
The `[get_touch_right](https://docs.arduino.cc/tutorials/alvik/api-overview/#get_touch_right)` function returns true if the Right button is pressed.
583
567
584
-
**Outputs:**
585
-
`touch_right`: true if Right button is pressed, false otherwise.
586
568
587
569
**Example**
588
-
589
570
The following example demonstrates how to read the state of each button and print its name when pressed:
590
571
591
572
```python
@@ -638,11 +619,11 @@ The distance sensor array is divided into five distinct zones: left, center-left
638
619
The `get_distance` function returns the distance readouts from the left, center-left, center, center-right, and right sensors.
639
620
640
621
**Outputs:**
641
-
-`L`: Left sensor readout.
642
-
-`CL`: Center-left sensor readout.
643
-
-`C`: Center sensor readout.
644
-
-`CR`: Center-right sensor readout.
645
-
-`R`: Right sensor readout.
622
+
`L`: Left sensor readout.
623
+
`CL`: Center-left sensor readout.
624
+
`C`: Center sensor readout.
625
+
`CR`: Center-right sensor readout.
626
+
`R`: Right sensor readout.
646
627
647
628
**Example Usage**
648
629
@@ -789,8 +770,8 @@ In this example, the robot uses its line follower sensor array to navigate along
789
770
```
790
771
791
772
**Outputs:**
792
-
-`color`: The label of the color as recognized by the sensor. These can be:
@@ -857,7 +838,6 @@ In this example, the robot uses its line follower sensor array to navigate along
857
838
`b` or `v`: The blue component in RGB format or the value in HSV format.
858
839
859
840
You can use these functions depending on your needs:
860
-
861
841
- Use `color_calibration` to calibrate the sensor for accurate readings.
862
842
- Use `get_color_raw` to get the raw sensor data.
863
843
- Use `get_color_label` to get a human-readable label of the detected color.
@@ -1007,7 +987,7 @@ And let's be honest, there's a certain satisfaction in programming your robot to
1007
987
1008
988
The Arduino Alvik robot comes equipped with two RGB LEDs that can be controlled to display various colors. These LEDs can be used for signaling, indicating status, or just for fun. The following functions are available for controlling the LEDs:
1009
989
1010
-
1.**Set color** of the Alvik's RGB LEDs
990
+
**Set color** of the Alvik's RGB LEDs
1011
991
1012
992
The `set_color` function sets the color of the LED by specifying the intensity of red, green, and blue components.
1013
993
@@ -1488,8 +1468,7 @@ The servo motors connectors are placed at the back of Alvik, in this tutorial we
1488
1468
***The port provides 5 Volt to the motor, so be sure to connect a servo that runs with 5V.***
0 commit comments