finds track with line scan camera
CAMERA.h@0:7653b2a26797, 2018-12-19 (annotated)
- Committer:
- pkolar1
- Date:
- Wed Dec 19 09:13:48 2018 +0000
- Revision:
- 0:7653b2a26797
fin
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pkolar1 | 0:7653b2a26797 | 1 | #ifndef CAMERA_H |
pkolar1 | 0:7653b2a26797 | 2 | #define CAMERA_H |
pkolar1 | 0:7653b2a26797 | 3 | #include "mbed.h" |
pkolar1 | 0:7653b2a26797 | 4 | |
pkolar1 | 0:7653b2a26797 | 5 | class CAMERA //finds the track with Line Scan camera |
pkolar1 | 0:7653b2a26797 | 6 | { |
pkolar1 | 0:7653b2a26797 | 7 | public: |
pkolar1 | 0:7653b2a26797 | 8 | CAMERA(PinName dig1,PinName dig2,PinName an); |
pkolar1 | 0:7653b2a26797 | 9 | void init(); |
pkolar1 | 0:7653b2a26797 | 10 | void protocol(); |
pkolar1 | 0:7653b2a26797 | 11 | int buffer(); |
pkolar1 | 0:7653b2a26797 | 12 | void pathFinder(); |
pkolar1 | 0:7653b2a26797 | 13 | int getPath(); |
pkolar1 | 0:7653b2a26797 | 14 | |
pkolar1 | 0:7653b2a26797 | 15 | private: |
pkolar1 | 0:7653b2a26797 | 16 | DigitalOut SI,CK; |
pkolar1 | 0:7653b2a26797 | 17 | AnalogIn lux; |
pkolar1 | 0:7653b2a26797 | 18 | int i,xL,xR,carrot,pixel[128]; |
pkolar1 | 0:7653b2a26797 | 19 | float halfPulse,sum,mean,signal; |
pkolar1 | 0:7653b2a26797 | 20 | Ticker t; |
pkolar1 | 0:7653b2a26797 | 21 | }; |
pkolar1 | 0:7653b2a26797 | 22 | #endif |