finds track with line scan camera

Dependents:   aNXPCupCar

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CAMERA.h Source File

CAMERA.h

00001 #ifndef CAMERA_H
00002 #define CAMERA_H
00003 #include "mbed.h"
00004 
00005 class CAMERA    //finds the track with Line Scan camera
00006 {
00007 public:
00008     CAMERA(PinName dig1,PinName dig2,PinName an);
00009     void init();
00010     void protocol();
00011     int buffer();
00012     void pathFinder();
00013     int getPath();
00014 
00015 private:
00016     DigitalOut SI,CK;
00017     AnalogIn lux;
00018     int i,xL,xR,carrot,pixel[128];
00019     float halfPulse,sum,mean,signal;
00020     Ticker t;
00021 };
00022 #endif