Data Sheet

4/27/2018 OpenCR1.0
http://emanual.robotis.com/docs/en/parts/controller/opencr10/ 44/50
7. 7. 4. 2. Result
OpenCR 04 Capacitive Touch Sensor Example
7. 7. 5. Flame Sensor
It is flame sensor test on the OpenCR board.
Pinouts
Blue : Signal
Red : Vcc
Black : Gnd
Specification
Flame Sensor Specification
Detection range : 20cm(4.8V) ~ 100cm(1V)
{
pinMode(SensorINPUT, INPUT);
pinMode(BDPIN_LED_USER_1, OUTPUT);
pinMode(BDPIN_LED_USER_2, OUTPUT);
pinMode(BDPIN_LED_USER_3, OUTPUT);
pinMode(BDPIN_LED_USER_4, OUTPUT);
}
void loop()
{
if (digitalRead(SensorINPUT) == HIGH )
{
for(i=0; i<4; i++)
{
digitalWrite(LED[i], LOW);
delay(100);
digitalWrite(LED[i], HIGH);
}
}
if (digitalRead(SensorINPUT) == LOW )
{
for(i=0; i<4; i++)
{
digitalWrite(LED[i], HIGH);
}
}
}
OpenCR1.0
Back to Top ▲