SeeedStudio Grove 101020049 Скачать руководство пользователя страница 8

 

 

4.  Usage 

The module is mainly used to detect the infrared light. It outputs digital signal 0 and 1 through a 

Comparator output. The output value will be 0 when infrared light is detected. And the sensitivity 

is adjustable by the precision potentiometer. 

Let's use it to control. When the output value is 0, the led will light up. 

1. Connect the module to the D3 of 

Grove - Base Shield

 using the 4-pin grove cable. 

2. Plug the Grove - Base Shield into Arduino. 

3. Connect Arduino to PC by using a USB cable. 

4. Copy and paste code below to a new Arduino sketch. Please click here if you do not know how 

to upload. 

/************************************************************************

******/

 

 

#define SENSOR 3 

//connect SENSOR to digital pin3 

#define LED 2

//connect Grove - LED to pin2 

 

void

 setup

()

  

{

                 

    pinsInit

();

 

}

 

void

 loop

()

  

{

 

    

if

(

isFlameDetected

())

 

    turnOnLED

();

 

    

else

 turnOffLED

();

 

}

 

/********************************/

 

void

 pinsInit

()

 

{

 

    pinMode

(

FLAME_SENSOR

,

 INPUT

);

 

    pinMode

(

LED

,

OUTPUT

);

 

    digitalWrite

(

LED

,

LOW

);

 

}

 

void

 turnOnLED

()

 

{

 

    digitalWrite

(

LED

,

HIGH

);

 

}

 

void

 turnOffLED

()

 

{

 

Содержание Grove 101020049

Страница 1: ...1 Grove Fingerprint Sensor Version 1 0 Release date 9 20 2015 Wiki http www seeedstudio com wiki Grove_ _Flame_Sensor Bazaar http www seeedstudio com depot Grove Flame Sensor p 1450 html ...

Страница 2: ...2 Document Revision History Revision Date Author Description 1 0 Sep 21 2015 Victor He Create file ...

Страница 3: ...3 Contents Document Revision History 2 1 Introduction 2 2 Feature 3 3 Specification 4 4 Usage 5 5 Reference 7 6 Resource 8 7 Support 9 ...

Страница 4: ...ision of Seeed Technology Inc this manual has been compiled and published which covered the latest product description and specification The content of this manual is subject to change without notice Copyright The design of this product including software and its accessories is under tutelage of laws Any action to violate relevant right of our product will be penalized through law Please conscious...

Страница 5: ... the range of 760nm 1100 nm It is based on the YG1006 sensor which is a high speed and high sensitive NPN silicon phototransistor Due to its black epoxy the sensor is sensitive to infrared radiation In firefighting robot game the sensor plays a very important role it can be used as a robot eyes to find the fire source ...

Страница 6: ...3 2 Feature Grove Interface High Photo Sensitivity Fast Response Time Easy to use Sensitivity can adjustable ...

Страница 7: ...4 3 Specification Item Min Typical Max Unit Voltage 4 75 5 0 5 30 VDC Current 20 mA Range of Spectral Bandwidth 760 940 1100 nm Detection range 0 1 m Response Time 15 μS Operating Temperature 25 85 ...

Страница 8: ...e to the D3 of Grove Base Shield using the 4 pin grove cable 2 Plug the Grove Base Shield into Arduino 3 Connect Arduino to PC by using a USB cable 4 Copy and paste code below to a new Arduino sketch Please click here if you do not know how to upload define SENSOR 3 connect SENSOR to digital pin3 define LED 2 connect Grove LED to pin2 void setup pinsInit void loop if isFlameDetected turnOnLED else...

Страница 9: ...6 digitalWrite LED LOW boolean isFlameDetected if digitalRead FLAME_SENSOR return false else return true 5 The LED will light up when there is infrared light Please use it to design your products ...

Страница 10: ...7 5 Reference The sensor can detect the light source whose wavelength is in the range of 760nm 1100 nm The below picture shows the spectral sensitivity ...

Страница 11: ...8 6 Resource Grove Flame Sensor Eagle File Github repository for Grove_Flame_Sensor Library new LM293D datasheet ...

Страница 12: ...9 7 Support If you have questions or other better design ideas you can go to our forum or wish to discuss ...

Отзывы: