Weston Middle School

Technology/EngineeringCourse Materials

Weston, Massachusetts
| Home | Lego Robotics | Grade 7 Design-Construction | Grade 8 Design-Construction | Links |
Lego NxT Roboticst Variables- Part 1ditRegion3

Course Home

Syllabus

Course Calendar

Activities and Projects

Building References

Programming References

Presentations

Gallery

Frameworks

Additional Info

VARIABLES CHALLENGE- PART I

You will create a Number variable called Count and use it to count things.


In NxT-G,

  • EDIT-DEFINE VARIABLE- Create:
    • Name: Count; Datatype: Number
  • New Program- Save as Count1

Algorithm:

  • Loop:
    • Wait for Bump ( = touch and release)
    • Read Current Value of Count ( Data- Insert Variable- Count - Read)
    • Add 1 to Count using Math Block ( Data- Math)
    • Write value to Count
    • Beep (lets you know the count has occured)
    • Display Value of Count on screen:
      Read Count #, convert to text ( Advanced--# to Text )
    • Display Text Value on Screen
    • End of Loop

Printout must include summary of algorithm, location of touch sensor, names


Extra Credit:


In place of touch sensor, use sound sensor, light sensor, or distance sensor-- in all cases, is two changes-- high to low or low to high---Why is that?

Links

 

 

EditRegion5
 
Revised January 2011 by Jonathan Dietz, dietzj@mail.weston.org