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/getting-started-mblock/getting-started-mblock.md
description: "Take your first steps with Arduino® Alvik."
4
+
description: "Take your first steps with Arduino® Alvik and mBlock."
5
5
tags:
6
6
- Robot, Block-based, Education
7
7
author: "Gaia Castronovo"
8
8
---
9
-
## Getting Started With Alvik
9
+
## Use Alvik with block-based language
10
10
11
-
Arduino® Alvik is a powerful and versatile robot specifically designed for programming and STEAM education.
12
-
13
-

11
+

14
12
15
13
Welcome to your first experience with Alvik, your companion for exploring robotics and programming. In this guide, we'll walk you through setting up your Alvik and starting your journey into block based.
16
14
@@ -21,21 +19,154 @@ When unboxing Alvik, you should find the following items:
21
19
- Alvik robot
22
20
- USB-C® cable (located under the cardboard tray)
23
21
24
-
### Supported Systemes
22
+
## Preparing Your Environment
23
+
24
+
During the installation process, you may **need to install additional drivers**, which might require the **administrator login password**.
25
+
26
+
### Supported Systems
27
+
28
+
You can use a computer with different systems like:
25
29
26
-
You can use a computer with different systems like Windows, Mac, Chromebook, or Linux.
30
+
* Windows
31
+
32
+
* Mac,
33
+
* Chromebook,
34
+
* Linux.
27
35
28
36
***Alvik is not yet supported by mBlock mobile app for Android or IOS devices.***
29
37
30
-
## Preparing Your Environment
38
+
### Online Coding
39
+
40
+
For a quick start, you can use the *mBlock web version*. Scroll down on the [download page](https://mblock.cc/pages/downloads) to download the correct **mLink driver** for your **operating system**.
41
+
42
+

43
+
44
+
After downloading, install the **drivers**. This small software helps your computer communicate with the robot. When prompted, simply click "INSTALL."
45
+
46
+

47
+
48
+
Once mLink is installed, open it and connect to <ahref="https://ide.mblock.cc">**ide.mblock.cc**</a> using a web browser (Google Chrome is recommended). From now on, whenever you want to code Alvik, open the mLink application and go to the webpage mentioned above.
49
+
50
+
### Offline Coding
51
+
52
+
Please [download the software](https://mblock.cc/pages/downloads), then double-click the installer file and follow the instructions to complete the installation.
53
+
54
+
If you're using a *Windows* or *Mac* computer, scroll down the page and click the appropriate button. For *Chromebook* or *Linux* users, the process is slightly different.
55
+
56
+

57
+
58
+
### Windows
59
+
60
+
To install mBlock on Windows:
61
+
62
+
1. Click the "Download for Windows" button, wait for the download to finish, and find the file in your Downloads folder.
2. Double-click the downloaded file and click "YES" when prompted. Follow the on-screen instructions to complete the installation.
67
+
68
+
3. Install the **drivers** to allow your computer to communicate with the robot. A window will appear asking you to click "INSTALL."
69
+
70
+

71
+
Sometimes, the driver installation window may open in the background. Look for the computer icon in your application bar and click it to continue.
72
+
73
+
If you encounter an installation error, try clicking "UNINSTALL" and then "INSTALL" again. Once the driver installation is complete, close the driver window manually by clicking the "X" button. After installing the drivers, finish the mBlock installation.
74
+
75
+
Find mBlock on your computer (it has a Panda icon) and open it.
76
+
77
+
### MacOS
78
+
79
+
To install mBlock on macOS:
80
+
81
+
1. Click on the "Download for Mac" button on the [Download page](https://mblock.cc/pages/downloads), wait for the download to finish, and find the file in your Downloads folder.
82
+
2. Double-click the downloaded file to mount the `.dmg` file. Then, drag the Panda icon to the Applications folder.
83
+
84
+

85
+
86
+
3. Open the Applications folder, locate the mBlock app, and open it. The first time you open the software, right-click (or Control-click) on the app and select "Open" from the dropdown menu.
87
+
88
+
### Chromebook or Linux
89
+
90
+
If you're using a **Chromebook** ([read the full guide here](https://support.makeblock.com/hc/en-us/articles/19412317319191-Device-Connection-Guide-for-Chromebook-Latest-Version)) or a **Linux** machine, the installation process is different because there is no installable version of the software available. Instead, you'll use the online version of mBlock, which requires a special driver to connect to the robot.
91
+
92
+
1. Scroll down to find the "mLink - mBlock web version driver" and download the appropriate file for your operating system.
93
+
94
+

31
95
96
+
2. Go to your Downloads folder and install the driver. The installation steps may vary depending on your operating system.
97
+
98
+
## Update Firmware
99
+
100
+
101
+
102
+
103
+
104
+
## Connect the robot to mBlock
105
+
106
+
To program Alvik, start by opening the mBlock software if you haven’t already. Once the software is open, follow these steps to connect:
107
+
108
+
**1.** Locate the robot's **on/off switch** and slide it to the **OFF** position.
109
+
110
+
***To ensure a proper connection and protect the robot's battery, always turn off the robot before connecting it to your computer; it may not appear if left on***
111
+
112
+

113
+
114
+
**2.** <ahref="https://ide.mblock.cc">Open mBlock</a>. In the `Device` section, add Alvik as a programmable board by clicking the `+ Add` button, then selecting Alvik from the robot list.
115
+
116
+

117
+
118
+
**3.****Connect the programming cable** to your computer and the Arduino Nano ESP32, the brain of the robot.
119
+
120
+

121
+
122
+
**4.** Locate the robot's **on/off switch** and slide it to the **ON** position.
123
+
124
+

125
+
126
+
**5.** Establish the connection to **mBlock** clicking on the **Connect** button.
**6.** Click the **Connect** button in the pop-up window.
131
+
132
+
In the connect window, select the **Serial Port**, which is the interface the computer uses to communicate with the robot. On Windows, you might see something like COM4 (or another number), while on other operating systems, it could be something like `/dev/tty.[yourSerialPortName]`. mBlock typically detects the correct port automatically, but if you encounter any issues, make sure the selected port is the right one.
133
+
134
+

135
+
136
+
**7.** You are **ready** to work!
32
137
33
138
## Blocks
34
139
35
-
## First Program
140
+
Explore mBlock to start programming Alvik. You'll find a list of visual blocks in the center of the interface. Each block represents a command Alvik can execute, divided into **different colored folders by action kind**.
141
+
142
+
When you're creating a sequence of commands for Alvik you **always need to start by stating the initial event**:
143
+
Find an `Event` command that starts when a button is pressed.
144
+
145
+
## Blink
146
+
147
+
Alvik comes with two built-in **RGB LEDs**, located on top of the robot.
148
+
149
+

150
+
151
+
On the top of Alvik you can also find **8 buttons**, that let you operate the robot.
152
+
153
+

154
+
155
+
The goal of our first program is to make the LEDs flash when you press a button on Alvik:
156
+
157
+
1. Navigate to the `Events` folder and drag the command `When button [ok] is pressed` to the coding area on the right.
158
+
159
+
2. Next, go to the `LEDs` folder and drag `set [left] LED color to [RED] for (1) seconds` into the coding area, connecting it to the previous command.
160
+
161
+
3. You need to upload the code to the robot. **Remember to turn ON the robot before uploading the code.** Transfer the program from the PC to the board by clicking the blue `Upload Code` button in the left side of the interface, and wait for the file transfer. You are now ready to test the code: let's press the `✔` button on the Alvik!
162
+
163
+
Now you’ve created your first program: Alvik will turn on the left LED for one second when the OK `✔` button is pressed.
164
+
165
+

36
166
37
-
Once you’ve set up Alvik, it’s time to run your first program.
167
+
Every parameter inside the white area (for example the number `1` or the `▼` element in the dropdown menu) may be edited, to give Alvik a different behavior. Let's try to edit the program to make the robot turn on *yellow* both LEDs, for *5 seconds*, when button `cancel` is pressed.
0 commit comments