This library contains all the necessary elements to make all the sensor boards designed and developed by Tejuino Electronics work, the operation of each of them is shown below.
Remember to use this library:
#include <TapatioElecronics.h>
This card has 16 infrared sensors dedicated to distinguishing a line with high contrast (black/white), usually used in line following robots.
1.- Import the library in your arduino project
#include <TapatioElecronics.h>
2.- Create an object to use
SensorBar16 sb(2,3,4,5,A0);
3.- Call the methods you need
sb.calibrate();
int pos = sb.getPosition();
...
CONSTRUCTOR
SensorBar16(int s0,int s1,int s2, int s3, int out);
METHODS
int getPosition();
int getPosition(int range);
void calibrate(int times=800);
int* analogValues();
int* digitalValues();
int singleSensorRead(int sensor);
int* getUmbral();
int* getValues();
- Analog Read: Example showing the use of the sensor bar in an analog mode
- Digital Read: Example showing the use of the sensor bar in an digital mode
- Single Sensor: shows how to access each sensor separately
- get Position: Example showing the operation for a line following robot