Ks0119 keyestudio EASY plug Line Tracking Sensor: Difference between revisions
Keyestudio (talk | contribs) |
Keyestudio (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
[[image:ks0119图.jpg|thumb|600px|right|Keyestudio EASY plug Line Tracking Sensor]] | |||
==Introduction== | ==Introduction== | ||
The Line Tracking Sensor can tell white from in black or black from white accurately. <br> | |||
The working principle is simple, using infrared light's different reflectivity | The single line-tracking signal provides a stable output signal TTL for a more accurate and more stable line. <br> | ||
Note: this | The working principle is simple, using infrared light's different reflectivity for different color, and converting the strength of the reflected signal into current signal. <br> | ||
<span style="color: red">'''Note: ''' this sensor needs to be used together with EASY plug control board.<br> | |||
<br> | |||
==Specification== | ==Specification== | ||
* | * Connector: Easy plug | ||
* Power supply: | * Power supply: 5V | ||
* Operating current: <10mA | * Operating current: <10mA | ||
* Operating temperature | * Operating temperature: 0℃~ 50℃ | ||
* Output Level: TTL | * Output Level: TTL (Black for LOW output, White for HIGH output) | ||
* | * High quality connector | ||
<br> | |||
==Technical Details== | |||
* Dimensions: 57mm*16mm*18mm | |||
* Weight: 4.8g | |||
<br> | |||
== | ==Connect It Up == | ||
<br>[[File:ks0119 | Connect the EASY Plug line tracking sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable. | ||
<br>[[File:ks0119.jpg|500px|frameless|thumb]]<br> | |||
<br> | |||
== | ==Upload the Code== | ||
Copy and paste below code to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE] and upload. | |||
<pre> | <pre> | ||
#define Sensor | #define Sensor 5 | ||
#define ledpin 13 | #define ledpin 13 | ||
void setup() | void setup() | ||
{ | { | ||
pinMode(Sensor,INPUT); | |||
pinMode(ledpin,OUTPUT); | |||
Serial.begin(9600); | |||
} | } | ||
void loop() | void loop() | ||
{ | { | ||
int val=digitalRead(Sensor); | |||
digitalWrite(ledpin,val); | |||
Serial.println(val);// print the data from the sensor | |||
delay(200); | |||
} | } | ||
</pre> | </pre> | ||
<br> | |||
==What You Should See== | |||
Done uploading the code to board, open the serial monitor and set the baud rate to 9600, then you can see the data from the sensor. | |||
<br>[[File:ks0119 Result.gif|500px|frameless|thumb]]<br> | |||
<br> | |||
==Resources == | ==Resources == | ||
'''PDF'''<br> | |||
'''PDF''' | |||
https://drive.google.com/open?id=1_5tDsf1KbADdRdkTcWfUrLYqgneSj97p | https://drive.google.com/open?id=1_5tDsf1KbADdRdkTcWfUrLYqgneSj97p | ||
<br> | |||
==Buy from == | ==Buy from == | ||
'''Official Website''' | '''Official Website'''<br> | ||
http://www.keyestudio.com/keyestudio-easy-plug-line-tracking-sensor-module-for-arduino-starter.html | http://www.keyestudio.com/keyestudio-easy-plug-line-tracking-sensor-module-for-arduino-starter.html | ||
[[category:EASY Plug]] | [[category:EASY Plug]] |
Revision as of 10:46, 16 November 2018
Introduction
The Line Tracking Sensor can tell white from in black or black from white accurately.
The single line-tracking signal provides a stable output signal TTL for a more accurate and more stable line.
The working principle is simple, using infrared light's different reflectivity for different color, and converting the strength of the reflected signal into current signal.
Note: this sensor needs to be used together with EASY plug control board.
Specification
- Connector: Easy plug
- Power supply: 5V
- Operating current: <10mA
- Operating temperature: 0℃~ 50℃
- Output Level: TTL (Black for LOW output, White for HIGH output)
- High quality connector
Technical Details
- Dimensions: 57mm*16mm*18mm
- Weight: 4.8g
Connect It Up
Connect the EASY Plug line tracking sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
Upload the Code
Copy and paste below code to Arduino IDE and upload.
#define Sensor 5 #define ledpin 13 void setup() { pinMode(Sensor,INPUT); pinMode(ledpin,OUTPUT); Serial.begin(9600); } void loop() { int val=digitalRead(Sensor); digitalWrite(ledpin,val); Serial.println(val);// print the data from the sensor delay(200); }
What You Should See
Done uploading the code to board, open the serial monitor and set the baud rate to 9600, then you can see the data from the sensor.
Resources
PDF
https://drive.google.com/open?id=1_5tDsf1KbADdRdkTcWfUrLYqgneSj97p
Buy from
Official Website
http://www.keyestudio.com/keyestudio-easy-plug-line-tracking-sensor-module-for-arduino-starter.html