Tuesday, December 23, 2014

Motion sensor application in modified goalkeeper robotic game

This post will show how a motion (distance) sensor can be used to control the speed of a motor and via a crank, the speed at which a goalkeeper moves. The original construction as given by Lego is as shown below (the guidance of parents or grandparents is probably needed for this post):

Original Lego Wedo Goalkeeper construct

(building instructions here)
Original Lego Wedo goalkeeper game construction
Lego Wedo goalkeeper game construction as per Lego building instructions
with motion sensor looking different direction from goalkeeper

Look at the direction the motion sensor is looking and the direction the goalkeeper is looking. The motion sensor is looking the wrong way. So we need to modify the setup so that the motion sensor is looking the same way as the goalkeeper - at the striker (ball kicker). Below shows the photo where the sensor is looking at the same direction as the goalkeeper:

Modified Lego Wedo Goalkeeper construct


Modified Wedo goalkeeper game construction with motion sensor
looking same direction as goalkeeper

Now for the programming

Start button > Screen with motion sensor input > Motor power block with motion sensor input > Motor > Repeat loop
Lego Wedo goalkeeper game programming
Programming for the Lego Wedo goalkeeper game
with screen showing motion sensor values

The screen is added so that we can see what values the motion sensor is outputting.

Video

Now for the video. Wish I can be a better videographer but if you concentrate on the content, you will should be able to follow what is going on, but please excuse my accent:

1 comment:

Related Posts Plugin for WordPress, Blogger...