Presentation is loading. Please wait.

Presentation is loading. Please wait.

WeDo Basic Builds and Scratch Code Blocks. Ducks – Build 1.

Similar presentations


Presentation on theme: "WeDo Basic Builds and Scratch Code Blocks. Ducks – Build 1."— Presentation transcript:

1 WeDo Basic Builds and Scratch Code Blocks

2 Ducks – Build 1

3 Ducks – Scratch Code This code works with the ducks build. The ducks spin in circles. One could imagine them dancing on a lake. The build uses a motor and a pulley to make the ducks spin.

4 Spinner – Build 2 Spins the spinner top left or right depending on if the “L” key or the “R” key is pressed.

5 Monkey – Build 3

6 Monkey – Scratch Code This code works with the monkey build. The monkey’s arms move up and down. One could imagine monkeys jumping, and their arms going up and down as you try to catch bananas from trees in the jungle. The build uses a motor, cams, and gears to make the monkey’s arms go up and down.

7 Alligator - Build 4

8 Alligator – Scratch Code This code works with the alligator build. The alligator's mouth opens and closes. One could imagine the alligator floating in a swamp. His mouth opens and closes as he tries to catch birds and other animals that adventure across the swamp in search of food. The build uses a motor, pulley and belt and a crown gear to make his mouth open and close

9 Lion – Build 5

10 Scratch Code for Walking Lion

11 Scratch Code for Lion Attack

12 Parrot / Stork – Build 6

13 Parrot / Stork – Scratch Code This code works with the bird build. As you push down on the bird’s tail, it’s wings go up and when you release the tail it’s wings go down. This action is competed with the help of a cam. We use a tilt sensor to register the movement of the bird’s wings. One could imagine the bird flying through the sky trying to catch it’s food. When he needs to rest, he could land on a tree branch.

14 Walking - Build 7

15 Scratch Code for Legs and Ball

16 Goal Keeper - Build 8

17 Scratch Code for the Goal Keeper

18 Scratch Code for the Ball

19 Dancing Boy and Girl – Build 9

20 Dancing Boy and Girl – Lesson Idea This code works with the boy and girl build. The build uses a motor, cams and gears to make them move. You could imagine them dancing. You can use different costumes in Scratch to make your sprits (boy and girl) look like they are dancing. The code on the next page is one example of how we did it. Notice that we use a forever control block to make the action continuous.

21 Dancing Boy and Girl – Scratch Code

22 Plane – Build 10

23 Plane – Lesson Idea This code works with the plane build. The plane uses a motor and gears to make the propeller rotate. We have also used a tilt sensor on the plane. You can go up by tilting the plane toward the ceiling and down by tilting the plane toward the floor. The plane can also bank left or right by tilting the plane in that direction. See the tilt sensor code on the next slide. You could imagine a plane crop dusting or fighting fires.

24 Plane – Scratch Code (Tilt Sensor) 0 = level (ahead) 1 = down 2 = right 3 = up 4 = left

25 Take Off and Landing Code This code accompanies the tilt sensor code on the previous slide. Here we set the position of the plane to where it looks like it’s on the ground. We set it’s speed to 0 and ask it to glide to a position near the horizon of the sky. This makes it look like its taking off. We then increase it’s speed gradually using a speed variable land a loop. The reason we multiple the speed by -1 is that the plane is moving from right to left, which is toward a negative x. We have used a broadcast to indicate when we want to take off and land. A “t” on the keyboard is used for take off and an “l” on the keyboard is used for landing. When we land we stop all of the scripts to make is appear as the plan has landed and turned off it’s motor.

26 Crane and Guy – Build 11

27 Crane and Guy – Scratch Code

28 Sail Boat – Build 12

29 Boat – Scratch Code


Download ppt "WeDo Basic Builds and Scratch Code Blocks. Ducks – Build 1."

Similar presentations


Ads by Google