5. Open Makerduino IDE, choose the right Board and Serial Port. Open the sketch EB_LineFinder.ino and upload it to the Makerduino.

The following is the demo code for EB - Line Finder. (Note: It could be a little different from the code file downloaded. Please follow the downloaded file.)

/*

Demo code for testing Line Finder

by Maker Studio

*/

#include "EB_LineFinder.h"

#include <SoftwareSerial.h>

//Connect Line Finder Sensor1 D8, Sensor2 to D9

EB_LineFinder myLineFinder(8,9);

void setup()

{

myLineFinder.begin();

Serial.begin(9600);

}

void loop()

{

Serial.print("Sensor1:");

Serial.println(myLineFinder.sensor1());

Serial.print("Sensor2:");

Serial.println(myLineFinder.sensor2());

Serial.println();

delay(1000);

}

6. Check the Results. After the sketch is successfully uploaded, test this module by putting a black line under an IR emitting LED or an IR sensitive phototransistor. Then you will find that the indicator LED turns ON. Otherwise, you move out the black line or just place the module in the air, the indicator LED turns OFF.