Ambient TOUCH LIGHT Instrukcja Użytkownika Strona 2

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 11
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 1
ROBOTC
Sensing
Forward Until Dark / Light 2
©
Carnegie Mellon Robotics Academy / For use with LEGO
®
MINDSTORMS® Education NXT software and base set 9797
Forward until Dark Light Sensor (cont.)
Light Sensor
The Light Sensor (in the normal Active mode) shines a
light out in a cone in front of it, and measures how much
light comes back to it, from either reection or ambient
sources. See additional explanation below.
Detects:
Feedback:
Typical use:
Sample code:
Reected + Ambient light
Brightness (0-100)
Line detection
while (SensorValue(lightSensor) > 40)
will run the while() loop as long as the
light sensor value remains brighter
than 40.
And now, let’s look at a new sensor.
This is the Light Sensor. When turned on, it shines a cone of red light out from the red LED, and
measures how much of it comes back into the light detector through the clear lens.
Clear lens
A light detector measures
how much light comes back.
Red lens
A cone of red light shines out
from the red LED.
Przeglądanie stron 1
1 2 3 4 5 6 7 ... 10 11

Komentarze do niniejszej Instrukcji

Brak uwag