Skip to content

Commit 3e05485

Browse files
committed
first draft
1 parent 8e1771f commit 3e05485

File tree

5 files changed

+142
-11
lines changed

5 files changed

+142
-11
lines changed
815 KB
Loading
248 KB
Loading
1.15 MB
Loading
844 KB
Loading

content/hardware/08.edu/solution-and-kits/alvik/tutorials/getting-started-mblock/getting-started-mblock.md

Lines changed: 142 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
---
2-
title: "First steps with Alvik and mBlock"
2+
title: "Use Alvik with block-based language"
33
difficulty: beginner
4-
description: "Take your first steps with Arduino® Alvik."
4+
description: "Take your first steps with Arduino® Alvik and mBlock."
55
tags:
66
- Robot, Block-based, Education
77
author: "Gaia Castronovo"
88
---
9-
## Getting Started With Alvik
9+
## Use Alvik with block-based language
1010

11-
Arduino® Alvik is a powerful and versatile robot specifically designed for programming and STEAM education.
12-
13-
![Alvik's Robot](assets/alvik_main.jpg)
11+
![Alvik's Robot](assets/getting-started.jpg)
1412

1513
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.
1614

@@ -21,21 +19,154 @@ When unboxing Alvik, you should find the following items:
2119
- Alvik robot
2220
- USB-C® cable (located under the cardboard tray)
2321

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:
2529

26-
You can use a computer with different systems like Windows, Mac, Chromebook, or Linux.
30+
* Windows
31+
32+
* Mac,
33+
* Chromebook,
34+
* Linux.
2735

2836
***Alvik is not yet supported by mBlock mobile app for Android or IOS devices.***
2937

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+
![mlink drivers](assets/mlink-1.png)
43+
44+
After downloading, install the **drivers**. This small software helps your computer communicate with the robot. When prompted, simply click "INSTALL."
45+
46+
![mlink drivers](assets/mlink-drivers.png)
47+
48+
Once mLink is installed, open it and connect to <a href="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+
![download webpage](assets/download-version.png)
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.
63+
64+
![download folder](assets/installing-download.png)
65+
66+
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+
![install driver](/assets/install-drivers.png)
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+
![install on mac](assets/install-mac.png)
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+
![download mlink](assets/mlink.png)
3195

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+
![Alvik switch slide on or off](/block-based-coding-robotics/_assets/projects/00/robot-off.png)
113+
114+
**2.** <a href="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+
![add device in mblock](assets/add-device.gif)
117+
118+
**3.** **Connect the programming cable** to your computer and the Arduino Nano ESP32, the brain of the robot.
119+
120+
![Connecting Alvik to the PC](assets/connecting-final.gif)
121+
122+
**4.** Locate the robot's **on/off switch** and slide it to the **ON** position.
123+
124+
![Alvik switch slide on or off](assets/alvik-on.png)
125+
126+
**5.** Establish the connection to **mBlock** clicking on the **Connect** button.
127+
128+
![mblock connect button](assets/connect-button.png)
129+
130+
**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+
![mblock connect button](assets/COM-port.png)
135+
136+
**7.** You are **ready** to work!
32137

33138
## Blocks
34139

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+
![command list](assets/command-list-horiz.png)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+
![Alvik LEDs](assets/alvik_leds.png)
150+
151+
On the top of Alvik you can also find **8 buttons**, that let you operate the robot.
152+
153+
![Alvik buttons](assets/touchButtons.png)
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+
![Blink](assets/blink.gif)
36166

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.
38168

169+
![yellow-blink](/block-based-coding-robotics/_assets/projects/00/yellow-blink.png)
39170

40171
### Next Steps
41172

0 commit comments

Comments
 (0)