This page describes how to use mBlock 5 to program Codey Rocky.
1. Download and install the required software
2. Connect Codey Rocky to mBlock 5
3. Start programming Codey Rocky
When using mBlock 5, you can refer to the following tips:
4.3 Learn Python based on blocks
1. Download and install the required software
Click To Access mBlock (& mLink)
2. Connect Codey Rocky to mBlock 5
Before programming Codey Rocky, you need to connect it to mBlock 5.
Refer to the following instructions according to your mBlock 5 version:
- Connect Codey Rocky to the mBlock 5 PC client
- Connect Codey Rocky to mBlock 5 on the web
- Connect Codey Rocky to the mBlock 5 app on your mobile device
Connect Codey Rocky to the mBlock 5 PC client
(1) Use a Micro USB cable to connect Codey to your PC, and power on Codey.
(2) Double-click the mBlock 5 icon on your PC to open it.
(3) On the Devices tab, click + add, select Codey, and click OK.
(4) Click Connect to connect Codey to mBlock 5.
A message is displayed after Codey is connected, indicating that the connection is successful.
Connect Codey Rocky to mBlock 5 on the web
(1) Use a Micro USB cable to connect Codey Rocky to your PC, and power on Codey.
(2) Double-click the mLink 2 icon on your PC to open it.
(3) Click Create now in the mBlock block-based editor area to open mBlock 5 on the web.
(4) Click the Devices tab, click + add, select Codey, and click OK.
(5) Click Connect to connect Codey to mBlock 5.
A message is displayed after Codey is connected, indicating that the connection is successful.
Connect Codey Rocky to the mBlock 5 app on your mobile device
(1) Enable Bluetooth on your mobile device.
(2) Turn on Codey.
(2) Open the mBlock 5 app on your mobile device, and tap Coding.
(3) Tap +, select Codey, and tap √.
(4) Tap Codey, tap Connect, and put your phone or tablet close to Codey Rocky.
mBlock 5 searches for Codey through Bluetooth and connects to it.
(5) Tap Back to coding.
3. Start programming Codey Rocky
Now, you can start to program Codey Rocky by dragging blocks to the scripts area on the right!
Start from a simple project: When you press button A on Codey, it says "Hello!"
(1) Set the programming mode.
mBlock 5 provides two programming modes, namely Live and Upload. You can click to switch the mode.
Live: In this mode, you can execute the blocks in real time, which helps you find out whether the program you've written works. In this mode, you must keep Codey connected to mBlock 5. If they are disconnected, the program can't be executed.
Upload: In this mode, you need to upload the compiled program to Codey. After being successfully uploaded, the program can still run properly on Codey when it is disconnected from mBlock 5.
In this project, set the programming mode to Upload.
(2) Drag the block "when button () is pressed" from the Events category to the scripts area, and select button A from the drop-down list box.
(3) Drag the block "play sound ()" from the Speaker category to the scripts area, and select the sound "hello."
(4) Click Upload to upload the program to Codey.
Now, try pressing button A on Codey!
4. Tips for using mBlock 5
4.1 Example programs
You can learn how to use some blocks designed for Codey Rocky through example programs.
On mBlock 5, choose Tutorials > Example Programs and click Codey Rocky to view example programs provided for Codey Rocky.
4.2 Block help
If you don't understand a block when using it, you can right-click it and click Help that appears.
4.3 Learn Python based on blocks
mBlock 5 provides two programming languages for Codey Rocky, namely block-based programming and Python. In Upload mode, you can click the buttons on the right to switch the programming languages.
In addition, when programming Codey Rocky in Upload mode, you can click the switching button on the right to view the corresponding Python statements (obtained by converting the blocks).
Comments
i did all the steps but the problem here is that the programe is not working i uploaded everything but ts not zorking
Please sign in to leave a comment.