Tuesday, February 18, 2014

February 18, 2014 - Day Nine

Students learned to use procedures with the robots today. Procedures are programs that are saved for later use. They can be integrated into other programs to make really big, complex programs. For instance, you could save a procedure that draws a leaf, another procedure that draws a petal, and a third procedure that draws a stem. The main program could then call all of these secondary programs to create a flower.

There are 32 open "slots" for users to create and save their own procedures. There are an additional five slots for users to program the special sensors on the robot. These sensors include the front bumper, back bumper, sound sensor, and sensors that detect the presence or absence of light. An example of how the sensors might be used is that the robot could be programmed so that if the front bumper hits something, the robot might honk its horn, back up, and turn completely around. Or perhaps, its headlights come on when the lights are turned off in the room.


Students learned how to create, save, and call procedures by inputting commands that were given to them on the interactive whiteboard. They executed the main program to see the outcome. One of the shapes turned out to be a simple flower, and the second was a much more complex flower.


Some students then chose to see what they could create with procedures, while others continued their Programming 101 lessons in Tynker.






0 comments:

Post a Comment

 

Copyright (c) 2010 Introduction to Coding. Design by WpThemesExpert
Blogger Template by New Blogger Templates.