Follow and Contact Us! Logo and Images are subject to Copyright .
  • Home
  • Introduction
    • Mindstorms Environment
    • Know Your Blocks!>
      • Common Palette Blocks>
        • The Wait Blocks
      • Complete Palette Blocks>
        • Action Blocks
  • Sensors
    • Why Use Sensors?
    • Touch Sensor
    • Ultrasonic Sensor
    • Light Sensor
    • Color Sensor
  • Motors
    • Swing Turns
    • Point Turns
    • Motor-A
    • Curving Robot?!
  • Advanced Code
    • Advanced Code Help
  • Videos & Websites!
    • Lego Mindstorms Website
    • FLL Website
    • nxtprograms.com (Projects)
    • The NXT Step Blog
    • NXT Club Blog
    • CodeBase
Picture
Ultrasonic Sensor: This sensor is like the eyes of your... Well, actually its more of the EARS for your robot. The Ultrasonic Sensor sends high tech  sound waves to seek out the objects near it. Much like a bat's sense of echolocation... The sensor has two settings to react to, Less than a certain distance away, or greater than a certain distance away. 

Tip: Using this sensor is risky at an FLL competition! If the team sharing the board with you has an ultrasonic sensor running at the same time, the sound frequencies of your robot may get messed up. Which means your program could fail. But, if all goes well, you could easily get a bunch of points!

The "See-Stop" Program

These pictures and instructions will show you step by step Ultrasonic Sensor programming to make your robot go forward until it knows when to stop, by "seeing" an object in front of it. Make sure your Ultrasonic Sensor is mounted in a way so that it see your "object"! If you are on a smart phone and you find pictures hard to see, switch the viewing mode to "web".

(Step 1) Just like the Touch-Stop program, drag a motor block out and keep the power on 45, the motors on CB, and have the duration set to unlimited forward. This tells our robot that motors C and B should go forward at 45 power until told to stop.

(Step 2) Drag out a wait block and set it to the ultrasonic sensor mode. Set the distance to "< 8 inches". Make sure you have the right port! This tells our robot to stop after its Ultrasonic Sensor reads that the object in front of it is less than 8 inches away.

(Step 3) Good luck! 
Picture
Sensors
Why Use Sensors?
Touch Sensor
Light Sensor
Color Sensor
Home
Powered by Create your own unique website with customizable templates.