Arduino line following module KY-033

Arduino line following module.
Hello world! I made a simple example on the KY-033 Line Tracing module.
In the video i Detect a white line of paper. The line following module is used in allot of projects for a line following robot. You can build many thing with this depends on your own creativity.

Schematic:
ky-033 obstacle avoidance sensor, Arduino line following module

Parts list:
Arduino uno, I used the RobotDyn Uno.
KY-033 Line Tracing Module.
1 LED (any color will do, i used white this time.)
Set of Jumper wires, MM/FF/MF

Code:

/*
Arduino line following module
Author: Danny van den Brande, Arduinosensors.nl. Bluecore Tech
in this example i show you how to use the KY-033 as a white line tracer.
 */
int WhiteLed = 2; 
int Sensor = A5; 
int sensorValue = 0; 

void setup () {
  pinMode (WhiteLed, OUTPUT);
  Serial.begin (9600);
}
void loop () {
  sensorValue = analogRead (Sensor);
  if (sensorValue < 50&& sensorValue < 500) 
  {
  digitalWrite (WhiteLed, HIGH);
  Serial.println (sensorValue, DEC);
  }
  else (sensorValue > 500&& sensorValue > 1023);
  { 
  digitalWrite (WhiteLed, LOW);
  Serial.println (sensorValue, DEC);
  }
}
Danny van den Brande

http://www.arduinosensors.nl

Programmer, Game Designer, 3D Designer, Web Designer, Graphic Designer. Jup this website looks crappy.. :) But enjoy the projects! Everything you need is here.

Leave a Reply

Your email address will not be published. Required fields are marked *