You are on page 1of 2

1.

What is the frequency of the signal sent by tone(9,


38000, 8)? How long does this call send the signal for?
What I/O pin does the IR LED circuit have to be connected to
in order to broadcast this signal?

38 kHz is the frequency of the signal. Although the 8 in tone calls


ms parameter calls for a signal that lasts for 8 ms, the book said
that testing indicated it lasted for 1.1 ms. The IR LED must be
connected to the digital pin 8 socket for the tone signal to make it
flash on/off at 38 kHz.

2. What has to happen after the tone command to find out


if the IR receiver detects reflected infrared?

The code has to pause for 1 ms with delay(1) and then store the
IR value by copying whatever digitalRead returns to a variable; for
example, delay(1) followed by irLeft = digitalRead(10)

3. What does it mean if the IR detector sends a low signal?


What does it mean when the detector sends a high signal?

A low signal means that 38 kHz IR was detected, which means


that the 38 kHz flashing light the IR LED transmitted must have
reflected off an object in its path. In other words: object detected.
A high signal means no 38 kHz IR was detected, so, there wasnt
any object to reflect the IR LEDs light. In other words: object not
detected.

4. What happens if you change the value of a resistor in


series with a red LED? What happens if you change the
value of a resistor in series with an infrared LED?

For both red and infrared LEDs, a smaller resistor will cause the
LED to glow more brightly. A larger resistor results in dimmer
LEDs. In terms of results, brighter IR LEDs make it possible to
detect objects that are farther away. But it can also have
annoying side effects, like seeing the reflection of the surface it is
rolling on and misinterpreting it as an obstacle.

You might also like