Part 1 Objective
After you upload the program, Codey blinks when you press button A.
Part 2 Preparation
-
Codey (robot controller) x 1
-
USB cable x 1
-
Computer with network access x 1
Connect Codey to the computer by using the USB cable, open mBlock 5 (PC client or web version), delete the default device, click +add, select Codey from the Device Library and then click Set as mostly used device in the upper left corner, click Connect, and select the Upload mode.
Part 3 Programming
Drag and drop the when button ( ) is pressed block from Events blocks, drag and drop the show image ( ) block from Looks blocks, and drag and drop the wait ( ) seconds block from Control blocks to the scripts area for facial expression DIY, and then click Upload to make Codey blink.
Part 4 Practice
-
Try to change Codey's blinking frequency.
-
Can you design other facial expressions for Codey?
-
Try to use other Looks blocks, for example, the show hello block. You can also use the light up x: ( ) y: ( ) block to light up a certain LED on Codey's screen.
Comments
Please sign in to leave a comment.