100 likes | 255 Views
NXT Programming. BSS 2011 Sustainable Engineering: Learning to Engineer Truly Green Products. Agenda. Introduction to Mindstorms Sensors Learning the Basics Programming Examples Programming Problems/Solutions Your Own Elaboration Homework. Introduction. Mindstorms Software
E N D
NXT Programming BSS 2011 Sustainable Engineering: Learning to Engineer Truly Green Products
Agenda • Introduction to Mindstorms • Sensors • Learning the Basics • Programming Examples • Programming Problems/Solutions • Your Own Elaboration • Homework
Introduction • Mindstorms Software • Graphical programming interface for beginners • Used in many national technology programs (i.e. FLL, RoboCup Junior, etc.) • Issue of Labview • REX files = 1 program
Sensors • Touch Sensor • reacts to touch and release, enabling your robotic creation to feel • Light Sensor • helps your robot see • Sound Sensor • allows your robot to hear • Ultrasonic Sensor • helps your robot judge distances and see where objects are
Learning the Basics • Infinite number of resources! • My favorite- • http://www.ortop.org/NXT_Tutorial/html/essentials.html • Move Block • Loops • Wait Block • Light Sensor • Ultrasonic Sensor • Switches
Problem Uno • Create and test a program to make the robot move in a square pattern. Each side of the square should be about 1 foot. The robot should end up back at where it started, and emit a happy little sound when it finishes
Solution • Loop • Move Block • Move forward, stop. • Move Block • Move forward, turning all the way right, stop • Forever turning- how do I make it stop?
Problem Two • Use the program from problem one, but now you are going to start your robot facing a wall. Which sensors will/can you use to overcome the wall obstacle? Show me.
Solution • Loop • Move Block • Move forward, stop. • Wait Touch Block • Pressed • Move Block • Move backward, stop • Move Block • Move forward, turning all the way right, stop
Homework! • Which sensor is the most sustainable (remember to include time and efficiency in your assessments, and explain, research may be needed)? • What situation would your robot need every single sensor for? Be creative. • Write out a code for your robot to dance (work with another group and ballroom dance? Square dance? Breakdance? Or, is your robot a ballerina?)