What is it?
This Grove-ultrasonic sensor is a non-contact distance measurement module. This sensor
offers industrial performance & provides a detecting range of 3cm to 4 meters (~1cm of
resolution). It features a transmitter & receiver. The module transmits ultrasonic waves that
reflect off the nearest object & the receiver detects the “echo”. The time it takes for the receiver
to see the reflected signal is how we can detect distance.
How to connect it?
This is a digital module that should connect to a digital pin (i.e. Grove connector J13 - J17). This
requires just a single signal pin, SIG0.
How to program it?
In Energia, you will need the Grove-Ultrasonic Ranger Sensor library. This library is available in
the Grove wiki, which is linked below. Along with the library are a few example sketches that
showcase how to use the library to display the distance on the display (in either cm or inches).
If the library is installed in Energia, you can find it at:
File > Examples > Libraries > UltrasonicRanger > [Examples]
More details:
http://www.seeedstudio.com/depot/BackorderGroveUltrasonic-Ranger-p-960.html?cPath=25_31
ANALOG MODULES
The Grove-Light Sensor
What is it?
The Light sensor module detects the light intensity of the environment. This is an analog Grove
module that will return a voltage between 0V and 3.3V. The brighter the environment, the higher
the output voltage.
How to connect it?
This is an analog module that should connect to an analog pin (i.e. Grove connector J5 - J9).
This requires just a single signal pin, SIG0.
How to program it?
In Energia, you will be able to use the analogRead(pin) API. This function will return back the
raw analog readings coming from the sensor. Depending on the resolution of the LaunchPad
ADC channels, the API will return a number between 0-255 (8-bit ADC), 0 - 1024 (10-bit ADC),
or 0 - 4095 (12-bit ADC).
More details:
http://www.seeedstudio.com/depot/Grove-Light-Sensor-p-746.html?cPath=25_27
批注 [7]: File path should be:
file>sketchbook>launchpad kit>grove
modules>ultrasonic ranger