Ambient TOUCH LIGHT Bedienungsanleitung Seite 3

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 11
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 2
ROBOTC
Sensing
Forward Until Dark / Light 3
©
Carnegie Mellon Robotics Academy / For use with LEGO
®
MINDSTORMS® Education NXT software and base set 9797
The light sensor can detect the basic colors of objects and surfaces by aiming directly at them at
close range. Light-colored surfaces, like this bright grey table, reect a large amount of the light,
and produce a high sensor reading. Dark-colored surfaces, like this strip of black electrical tape,
reect very little light, and produce a low sensor reading.
High readings vs. low readings can therefore be used to distinguish light surfaces from dark
ones. To make this work for the while() loop, we’ll need to use the same technique we used with
the Ultrasonic Sensor: set a threshold value to create a “cutoff” point between light and dark.
The sensor gives a light intensity reading of 0-100. But unlike the Ultrasonic Sensor, where the
number was in centimeters, the Light Sensor’s values are relative only, and do not correspond to
any set system of units. In fact, any light source – lamps, sunlight, shadows – and even the height
of the light sensor off the table can affect how much light the Light Sensor sees for the same
surface. So how can you set a fair cutoff (threshold) between light and dark?
In the next section, you will use the NXT’s View Mode to see for yourself what sorts of numbers
you get for different surfaces. You will use these real-world readings as reference values for light
and for dark. Your readings will give you measured “anchors,” that take into account the colors
of surfaces, and lighting conditions, and will allow you to make a proper choice of threshold.
Forward until Dark Light Sensor (cont.)
Seitenansicht 2
1 2 3 4 5 6 7 8 9 10 11

Kommentare zu diesen Handbüchern

Keine Kommentare