Makeblock Codey Rocky User Manual

Makeblock Codey Rocky User Manual

Hide thumbs Also See for Codey Rocky:

Advertisement

Code for Fun with
Codey Rocky
mBlock
www.makeblock.com

Advertisement

Table of Contents
loading

Summary of Contents for Makeblock Codey Rocky

  • Page 1 Code for Fun with Codey Rocky mBlock www.makeblock.com...
  • Page 2: Table Of Contents

    LED Animations LED Animations Turn Codey into a Musician Turn Codey into a Musician Make Codey Blink Eyes Make Codey Blink Eyes Make Codey Rocky Make Codey Rocky Identify Colors Identify Colors Make Codey Rocky Make Codey Rocky Avoid Obstacles...
  • Page 3 LED screen and more. And with just a few lines of code, you can easily make Codey Rocky do all kinds of amazing things, like playing music, chasing lights or changing facial expressions like humans.
  • Page 4 Connecting Codey Rocky to mBlock 5 1.Open mBlock 5. Connect Codey to your computer using the USB cable. (The on-screen instructions will tell you how to do when you are connecting Codey to the mBlock app.)
  • Page 5 2. Powering on:Press the power button to turn on Codey. 3.Connecting:You can find the Connect button in the stage area. Select the serial port number and click Connect. Scan the QR code on the left side to check out the demo.Note: The "COM3"...
  • Page 6 Quick Start Create a Codey Rocky Project Drag the play sound block to the script area. (You can quickly locate the blocks you need by color.) The blocks are in different colors and shapes. But they are able to connect to each other.
  • Page 7 Create a Stage Project Below the stage area, click Sprites and click + to add a sprite you like. (The panda is the default stage sprite.) If you want to delete a sprite, just click ‘’×’’ in the upper right corner of the sprite or right click the sprite icon to select delete.
  • Page 8 Give the sprite a sound effect and add an event block. Combine the two blocks with the move 10 steps block. Ok, now you've completed the program for your sprite! Click the icon’’ ‘’at the bottom right corner of the stage to run the program. As programmed, the bat will move 10 steps forward and play the sound “pop”.
  • Page 9: Change Codey's Emotions With Buttons

    Change Codey's Change Codey's Emotions with Buttons Emotions with Buttons Codey Scan the QR code to view the demo...
  • Page 10 Drag the play sound block to the script area. You can select another sound. Give Codey Rocky its expression In the Display category, you can ind the show image block. Drag the block to the script area and add it to the end of the play sound block.
  • Page 11 This is how your code should look like: You've added a piece of code to Codey Rocky. Next, upload the code to test whether it can work as expected! Try adding the following programs to Codey Rocky as you just did!
  • Page 12 Have a Try Have a Try Upload the code to Codey Rocky. Then try pressing the button A, B and C.(Remember to save your programs)
  • Page 13 Challenge Challenge Can you use the three buttons to let Codey Rocky show more emotions or make different sounds?
  • Page 14: Use Codey To Create Led Animations

    Use Codey to create Use Codey to create LED animations LED animations Codey Codey is able to show different images. So the mission of this booklet is to teach you how to animate those images. Scan the QR code to view the demo.
  • Page 15 Create Create Add an image Drag the show image for 1 sec block to the script area. You can reset the time. Click here to draw an image. Use the toolbar to re ine or save the image. Toolbar Repeat the steps above to give the rabbit different motions.
  • Page 16 Add a sound effect Add the play sound block to the code. You can pick another sound effect. Add a loop Drag the repeat 10 times block to the script area and use it to encircle other blocks. You can reset the times.
  • Page 17 Events category and add it to the code. You've completed the code for making an LED animation. Now you'll need to upload the code to Codey Rocky. Then try shaking it! Or you can tie Codey to your body. Notice how Codey reacts when...
  • Page 18 Have a Try Have a Try Remember to save the program! Challenge Challenge Can you create your own LED animations by drawing some different images? Give it a try!
  • Page 19: Turn Codey Into A Musician

    Turn Codey into a Musician Turn Codey into a Musician Codey Scan the QR code to view the demo...
  • Page 20 Create Create Add a note Drag the play note C3 for (0.25) beats block to the script area. You can reset the beat. Click here to select a note. Repeat the step to set different notes and snap the blocks together. Add an event Attach the when button A is pressed block to the top of the code.
  • Page 21 Add the volume control Drag the set volume to (100) block to the blank space in the script area. Note:Don’t add this block to the previous code. Add the gear potentiometer block Drag the gear potentiometer block and put it inside the set volume block. Gear potentiometer Gear potentiometer is an input device that can be used to adjust values.
  • Page 22 Add a loop Encircle the set volume and gear potentiometer blocks with the forever block. Add an event Drag the when Codey starts up block to the top of the group of blocks you've designed in the step 5. Now you've inished another program! Upload the program to Codey.
  • Page 23 Have a Try Have a Try Upload the program and press the button on Codey. Wait! Remember to save your program! Challenge Challenge Can you give Codey more sound effects or make Codey show light effects while playing music?
  • Page 24: Make Codey Blink Eyes

    Make Codey Blink Eyes Make Codey Blink Eyes Codey Scan the QR code to view the demo...
  • Page 25 Create Create Give Codey a facial expression Drag the show image for (1) sec block to the script area. You can reset the time. Click here to select or draw an image. Use the toolbar to revise and save the image. Toolbar Select an image Repeat the steps above to add different images.
  • Page 26 Add a loop Then you'll need to use the forever block. Drag the block to encircle the code. Add an event Drag the when Codey starts up block from the Events category and add it to the code. Ok, you've inished the program for making Codey blink eyes.
  • Page 27 Make Codey blink eyes randomly In the Operators category, you can ind the pick random (1) to (10) block. Put the block inside the show image for (0.2) secs block. You can change the random numbers . Note: You can't directly join these round blocks to other blocks.
  • Page 28 Have a Try Have a Try Remember to save your program! Challenge Challenge Can you make Codey show different facial expressions?
  • Page 29: Make Codey Rocky Identify Colors

    Make Codey Rocky Make Codey Rocky Identify Colors Identify Colors Codey Rocky Scan the QR code to view the demo...
  • Page 30 Create Create Add a sensor Drag the color is red block to the script area. You can reset the color. Add a control block Drag the if/then block to the script area and put the color is red block inside that hexagonal hole. Note:Hexagonal blocks can't directly join to other blocks.
  • Page 31 Ok, you've inished the code for enabling Codey Rocky to identify red items. Now upload the code to Codey and place a red item before Codey Rocky. See how it reacts? But if you want to empower Codey Rocky to identify...
  • Page 32 Repeat the steps 1-4 to make your code look like this: Add a loop Drag out the forever block and use it to encircle the code like this: Codey Rocky should be able to identify two colors. So why wait? Upload...
  • Page 33 Have a Try Have a Try Important: Make sure you keep the IR sensor face down. Challenge Challenge Try using different colored materials to make items for Codey Rocky to identify. And revise the code to have Codey Rocky show different reactions.
  • Page 34: Make Codey Rocky Avoid Obstacles

    Make Codey Rocky Make Codey Rocky Avoid Obstacles Avoid Obstacles Codey Rocky Scan the QR code to view the demo...
  • Page 35 Create Create Add an image Drag the show image block to the script area. Add a motion Find the move forward at power 50% block in the Action category. Then add it to the show image block. Add a sensor Drag the obstacles ahead? block to any blank space of the script area.
  • Page 36 Drag the wait until block to the script area and put the obstacles ahead block inside the hexagonal hole. Then join the two pieces of blocks like this. Make Codey Rocky stop moving Add the stop motion block to your code.
  • Page 37 Add an event Add the when Codey starts up block to your code. Ok, the code is ready now. Upload it to Codey Rocky to test how it works. Then try placing an item in front of the robot. What happens?
  • Page 38 Add a loop Encircle your code with the forever block as shown below. Now, Codey Rocky is able to stay away from obstacles whenever it meets them.
  • Page 39 Important: You should keep the IR sensor face forward. Have a Try Have a Try Look, Codey Rocky is able to avoid the obstacles!
  • Page 40 Challenge Challenge Try using the block in your code to make Codey Rocky stay away from cliffs. Make sure you make the IR sensor face down.
  • Page 41: Use Codey To Make Sprites Play Instruments

    Use Codey to Make Use Codey to Make Sprites Play Instruments Sprites Play Instruments Codey Scan the QR code to view the demo...
  • Page 42 Create Create Add the broadcast Drag the broadcast message block from the Events category to the script area. You can create a new message. Add an event Combine the when button A pressed block with the broadcast block like this. Add a sprite Click Sprites under the stage to add the sprite drum.
  • Page 43 Add a sound effect Drag the play sound high tom block to the script area. Add a costume Add the switch costume to drum-a block. You can change the costume. Add a control block Add the wait 1 sec block to the code in the following way.
  • Page 44 Add the switch costume to drum-a block. Add an event Drag the when I receive A block to the top of the code. Make sure your code looks like this. Ok, the code is ready. Now upload it to Codey Rocky to test how it works!
  • Page 45 Have a Try Have a Try Press the button. Let's hear the drum sound! Challenge Challenge Can you add more sprites to form a band?
  • Page 46: Design A Controller For Codey Rocky

    Design a Controller for Design a Controller for Codey Rocky Codey Rocky Codey Rocky Scan the QR code to view the demo...
  • Page 47 Create Create Add a sprite Select the sprite arrow1 from Sprites under the stage. Add the broadcast Drag the broadcast message block to the script area of the arrow1. You can create a new message. Add an Event Add the when this sprite clicked block to the broadcast block.
  • Page 48 Repeat the steps above to add four arrows indicating different directions. You can click Costumes to change the direction. Each device or sprite has its speci ic script area, so you'll need to make sure you place the three groups of blocks above in the correct script area.
  • Page 49 Add a motion Click Devices under the stage. Then drag the move forward at power 50% for 1 sec block to the script area. Add an event Use the when I receive up block in your code. You can select another direction here. Finish the code for the rest arrows as you did in the step 4 and step 5.
  • Page 50 Have a Try Have a Try Click the arrows to check how Codey Rocky reacts. Challenge Challenge You can try adding some other icons to empower the controller with more abilities, like sound control or facial expressions control.
  • Page 51: Make A Number Bomb Game

    Make a Number Bomb Game Make a Number Bomb Game Codey Rocky...
  • Page 52 Create Create Create a variable Click the Variables category and click Create variable. Name your variable as number and then click OK. Add a value Drag the set number to 0 block to the script area. Add the display block Click the Display category to add the show hello until done block to your code.
  • Page 53 Add a variable Find the number block in the Variables category. Drag it into the show hello until done block. Your code should look like this. Add an event Add the when Codey starts up block to the code. Add the value Drag the change number by 1 block to any blank space in the script area.
  • Page 54 Repeat Step 3 and Step 4. Add a sound effect Drag the play sound hello block from the Speaker category and add it to the code you've just created. You can reset the sound effect.
  • Page 55 Add an event Add the when button A is pressed block to the code you've inished in Step 7. Ok, the code is ready. Now upload it to Codey Rocky, turning the robot into a timer!
  • Page 56 Make a number bomb game to challenge your friends. Two players take turns pressing the button A. At the same time, the number is growing. The one that triggers the bomb will lose the game.
  • Page 57 Have a Try Have a Try Invite your friends to play the game! Challenge Challenge Revise the code above. Make sure the game will start over when the button C is pressed.

Table of Contents