Codey Rocky Projects

Makeblock / Tunniplaanid

Share on Social Networks

Share Link

Use permanent link to share in social media

Share with a friend

Please login to send this document by email!

Embed in your website

Select page to start with

24.

30.

37.

7. 8) Try shaking Codey to see the rabbit jumping!

31. 4) Repeat step 3 to add another sprite "Arrow3" to broadcast message "Down".

32. 5) Repeat step 3 to add another sprite "Arrow4" to broadcast message "Up".

13. 5) Click "Upload" to upload the program to Codey. 6) Check Codey to see it blink eyes!

15. 4) We want Codey Rocky to detect color blue. Right click to duplicate the blocks. Change the color to blue.

33. 6) Click to reposition the four arrows as the following image.

44. 11) Click "Upload" to upload the program to Codey. 12) Have a try!

21. 7) Check how Codey Rocky manages to stay away from obstacles. Note: adjust the IR sensor to face - forward.

29. 3) Right click "Arrow1" to duplicate. The new sprite will automatically be named "Arrow2". Click "Costumes" to change the costume. Select costume 2. When done, click "×" finish costume setting. In the Scripts area, click to create a new message "Left".

23. 3) Add a new sprite. Under "Sprites", click "+". From the pop - up Sprite Library window, choose "Drum" and click "OK".

17. 7) H ave a try! Note: keep the IR sensor face - down.

41. 8) Add a Control block if () then () to set how the game ends.

16. 5) Add a Control block forever to create a loop. 6) Click "Upload" to upload the program to Codey.

20. 5) Add a Control block forever to make Codey Rocky keep avoiding obstacles. 6) Click "Upload" to upload the program to Codey.

6. 6) Drag a play sound () block from the Speaker category to add some sound effects. Set the sound as "jump". 7) Click "Upload" to upload the program to Codey.

45. More Resources Example Programs You can find a variety of built - in example programs in mBlock 5. Go to the Project Management page to access those programs.

2. 3) Drag a show image () block from the Looks category. 4) Click "Upload" to upload the program to Codey. 5) Press Button A to see how Codey looks!

39. 5) Add an Events block when button () is pressed , and keep the default value. Add a Variables block change Number by () and also keep the default value.

43. 10) Add a Looks block show image () and draw the following image. Add a Speaker block play sound () , and set the sound to "explosion".

36. 9. Make a Number Bomb Game 1) Drag an Event block when Codey starts up to the Scripts area. 2) Choose Variables category and click "Make a Variable". Name the variable "Number" and click "OK".

5. 5) Add a Control block repeat () to wrap up the three show image () for () secs blocks. Reset the number to 6.

10. 5) Add a Control block forever , so we are able to adjust the sound volume all the time. 6) Click "Upload" to upload th e program to Codey. 7) P ress Button A to see how Codey plays music!

12. 4) Drag a Control block forever to wrap up the two show image () for () secs blocks, so Codey will keep blinking eyes.

25. 4) Make sure "Drum" is selected. Drag an Event block when I receive () . Add a Sound block start sound () and keep the default "high tom".

28. 2) Select "Arrow1". From the Events category, drag a when this sprite clicked block and a broadcast () block. Create a new message "Right".

9. 4) A dd a Speaker block set volume to ()% and a Sensing block gear potentiometer value , so that we can adjust the gear to change volume.

40. 6) Add a Speaker block play sound () to apply some sound effects to the game. 7) Click the following two blocks to duplicate and add them to the play sound () block.

38. 3) Add a Variables block set Number to () , and keep default value. 4) Add a Looks block show () until scroll done and a Variables block Number .

4. 3) Add a show image () for () secs block from the Looks category, and draw the following image. Reset the time to 0.3. 4) Add another show image () for () secs block from the Looks category, and draw the following image. Reset the time to 0.3.

19. 4) When Codey Rocky detects obstacles ahead, we want it to avoid them by moving backward and turning right, so we need to add three Action blocks: stop moving , move backward at power ()% for () secs , and turn right at po wer ()% for () secs .

42. 9) F rom the Operators category, drag a () > () block and a pick random () to () block. Set the number to 10 and 20. Then add a Variables block Number .

3. 2. Use Codey to Create LED Animations 1) Drag a when Codey is shaking block from the Events category to the Scripts area. 2) Drag a show image () for () secs block from the Looks category, and draw the following image. Reset the time to 0.3.

27. 8. Design a Controller for Codey Rocky This project combines stage programming with Codey. Before we start, please toggle to disable Upload Mode . Program Sprites 1) Under "Sprites", click "×" to delete the default sprite "Panda", and click "+" to add a new sprite. From the pop - up Sprites Library, choose "Arrow1" and click "OK".

1. Codey Rocky Projects 1. Change Codey's Emotions with Buttons 1) Drag a when button () is pressed block from the Events category to the Scripts area. 2) Drag a play sound () block from the Speaker category.

26. 5) Apply some animation effect to "Drum". Add a Looks block switch costume to () , and set the costume as "drum - b". Add a Control block wait () seconds , and change the value to 0.2. Add another Looks block switch costume to () , and set the costume as "drum - a". 6) Save your project. Press Button A to see what happens!

22. 7. Use Codey to Make Sprites Play Instruments This project combines stage programming with Codey. Before we start, please toggle to disable Upload Mode . 1) Drag an Events block when button () is pressed . 2) When Button A is pressed, we want the sprite to receive the message. We need to add an Events block broadcast () . Click to create a new message "A".

35. 9) Drag an Events block when I receive () and set the message to "Up". Add an Action block move forward at power ()% for () secs , and keep the default value. 10) Drag an Events block when I receive () and set the message to "Down". Add an Action block move backward at power ()% for () secs , and keep the default value. 11) Save your project. Click the arrows on the stage and see how Codey Rocky moves!

8. 3. Turn Codey into a Musician 1) Drag an Event block when button () is pressed to the Scripts area. 2) Add four play note () for () beats blocks from the Speaker category. Set the corresponding note as C4, E4, F4, and A5. Volume Control Script 3) Drag a when Codey starts up block from the Events category.

34. Program Codey 7) Choose "Codey" under "Devices". Drag an Events block when I receive () and set the message as " Left". Add an Action block turn left at power ()% for () secs , and keep the default value. 8) Drag an Events block when I receive () and set the message to "Right". Add an Action block turn right at power ()% for () secs , and keep the default value.

11. 4. Make Codey Blink Eyes 1) Drag an Event block when Codey starts up to the Scripts area. 2) Add a Looks block show image () for () secs . Add an Operators block pick random () to () to make Codey blink eyes randomly. Set the number as 2 a nd 5. 3) Add another Looks block show image () for () secs . Draw the following image, and set the time as 0.2.

18. 6. Make Codey Rocky Avoid Obstacles 1) Drag an Event block when Codey starts up to the Scripts area. 2) Add a Looks block show image () . 3) D rag an Action block () at power ()% , a Control block wait until () , and a Sensing block obstacles ahead? . Keep all default values.

14. 5 . Make Codey Rocky Identify Colors 1) Drag an Event block when Codey starts up to the Scripts area. 2) Add a Control block if () then () , and a Sensing block the color detected is ()? . 3) Add a Lighting block RGB LED lights up () to make the LED lights up red when the color detected is red. Drag a play sound () block and change the sound to "score" to add some sound effects.

Views

  • 176 Total Views
  • 138 Website Views
  • 38 Embeded Views

Actions

  • 0 Social Shares
  • 0 Likes
  • 0 Dislikes
  • 0 Comments

Share count

  • 0 Facebook
  • 0 Twitter
  • 0 LinkedIn
  • 0 Google+

Embeds 2

  • 1 51.83.143.171
  • 3 uus.insplay.eu