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
+29-19Lines changed: 29 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: "Start with Alvik and block-based language"
2
+
title: "Start with Alvik and Block-based Language"
3
3
difficulty: beginner
4
4
description: "Take your first steps with Arduino® Alvik and mBlock."
5
5
tags:
@@ -9,7 +9,7 @@ author: "Gaia Castronovo"
9
9
10
10

11
11
12
-
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.
12
+
Welcome to your first steps 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 with block based language.
13
13
14
14
## What’s Included in the Box
15
15
@@ -20,7 +20,7 @@ When unboxing Alvik, you should find the following items:
20
20
21
21
## Preparing Your Environment
22
22
23
-
During the installation process, you may **need to install additional drivers**, which requires access to the **administrator login password** to your OS.
23
+
During the installation process, you may **need to install additional drivers**, that require access to the **administrator login password** to your OS.
24
24
25
25
### Supported Systems
26
26
@@ -70,8 +70,6 @@ Sometimes, the driver installation window may open in the background. Look for t
70
70
71
71
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.
72
72
73
-
Find mBlock on your computer (it has a Panda icon) and open it.
74
-
75
73
### MacOS
76
74
77
75
To install mBlock on macOS:
@@ -87,12 +85,10 @@ To install mBlock on macOS:
87
85
88
86
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.
89
87
90
-
1. Scroll down to find the "mLink - mBlock web version driver" and download the appropriate file for your operating system.
88
+
To find the "mLink - mBlock web version driver" and download the appropriate file for your operating system.
91
89
92
90

93
91
94
-
2. Go to your Downloads folder and install the driver. The installation steps may vary depending on your operating system.
95
-
96
92
## Update Firmware
97
93
98
94
@@ -105,17 +101,17 @@ To program Alvik, start by opening the mBlock software if you haven’t already.
105
101
106
102
**1.** Locate the robot's **on/off switch** and slide it to the **OFF** position.
107
103
108
-
***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***
104
+
***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.***
109
105
110
-

106
+

111
107
112
108
**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.
113
109
114
110

115
111
116
-
**3.****Connect the programming cable** to your computer and the Arduino Nano ESP32, the brain of the robot.
112
+
**3.****Connect the programming cable** to your computer and the Arduino Nano ESP32.
117
113
118
-

114
+

119
115
120
116
**4.** Locate the robot's **on/off switch** and slide it to the **ON** position.
121
117
@@ -127,7 +123,7 @@ To program Alvik, start by opening the mBlock software if you haven’t already.
127
123
128
124
**6.** Click the **Connect** button in the pop-up window.
129
125
130
-
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.
126
+
In the connect window, select the **Serial Port**, in 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.
131
127
132
128

133
129
@@ -137,8 +133,20 @@ In the connect window, select the **Serial Port**, which is the interface the co
137
133
138
134
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**.
139
135
140
-
When you're creating a sequence of commands for Alvik you **always need to start by stating the initial event**:
141
-
Find an `Event` command that starts when a button is pressed.
136
+
When you're creating a sequence of commands for Alvik you **always need to start by stating the initial event** either:
137
+
138
+

139
+
140
+
*`When Alvik starts` - the code will be executed the moment you turn ON Alvik.
141
+
*`When button [] is pressed` - the code will be executed the moment you press the designated button.
142
+
143
+
### Blocks Parameters
144
+
145
+
Every parameter inside the **rectangle area**, for example the number `5` or the `cancel ▼` element in the dropdown menu can be edited, to give Alvik a different behavior.
146
+
147
+

148
+
149
+
Some blocks, for example in `Control` section, have an angular tile `⬣` parameter, where you can drag and drop in an entire block, allowing you to nest commands like`if < > then { }`.
142
150
143
151
## Blink
144
152
@@ -156,16 +164,18 @@ The goal of our first program is to make the LEDs flash when you press a button
156
164
157
165
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.
158
166
159
-
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!
167
+
3. You need to upload the code to the robot. **Remember to turn ON the robot when you are transferring the code.**Click the `Upload Code` button in the left side of the interface, and wait for the file transfer.
160
168
161
169
Now you’ve created your first program: Alvik will turn on the left LED for one second when the OK `✔` button is pressed.
162
170
163
171

164
172
165
-
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.
Alvik needs time to read the distance sensor, and if you keep looping too fast, it might get overwhelmed. To fix this, add a **small delay** (about 0.1 seconds). This won’t change much in behavior but will give Alvik **enough time to read the sensor**.
178
+
169
179
### Next Steps
170
180
171
181
* If you want to learn more about how Alvik is built or which functions you can use to program it, visit the documentation in the [Docs space for Alvik](https://docs.arduino.cc/hardware/alvik/) and follow the respective [Alvik's User Manual](https://docs.arduino.cc/hardware/alvik/user-manual) to know more about how to build incredible projects with your robot!
0 commit comments