mBlock 5 can be used to program hardware devices as well as sprites.
This section uses HaloCode as an example.
(1) Use a USB data cable to connect the device to a computer.
(2) Open mBlock 5, click add and choose your device in the Device Library dialog box the appears.
(3) Click Connect.
(4) In the dialog box that appears, use the serial port identified by mBlock 5 and click Connect.
(5) After the device is connected, Device connected is displayed.
The block area displays various types of blocks, and you can use them to implement various effects.
Now, try to complete the following task: When you press the blue button on HaloCode, all the LED indicators on it are on in red.
(1) Drag the Events block when button is pressed to the Scripts area.
(2) Drag the Lighting block all LEDs light up ( ) to the Scripts area.
(3) Press the blue button on HaloCode. Are all the LED indicators on in red?