In coding class we finished the code for the ellaphants we built. The kids made a program that would use the robot keypad buttons to control what it did. Up button to make the elephant walk forward. Down button for backward. Left button for head tilt and trunk trumpeting. And right button for picking up an object.
20160524 Science Class: Introduction to Apple/Carrot Peeling Machine Design Science with DIY Science Projects
Kids looked at how an automatic peeler works. They tried to make a model of a peeling machine. Most kids found that the motors they have used are not strong enough to support spinning the apply or the carrot. But there was a cute video of Nile's working!
In today's coding class we started on a motorcycle robot. It will use the gyroscopic sensor to keep itself balanced on 2 wheels. All they had for instructions was a video showing a working Lego motorcycle. No build instructions and no programming instructions.
The coding class finished programming their recent robot. They learned how to have multiple threads of program execution and how to interrupt one thread from another and how to use global variables as flags to send quick messages across threads.
利用multiple threads和program execution, 機器狗終於完成了!