
Adjusts the great pinscape controller to work with a cheap linear potentiometer instead of the expensive CCD array
Fork of Pinscape_Controller by
Diff: tls1410r.h
- Revision:
- 1:d913e0afb2ac
- Parent:
- 0:5acbbe3f4cf4
- Child:
- 2:c174f9ee414a
--- a/tls1410r.h Fri Jul 11 03:26:11 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* - * TLS1410R interface class. - * - * This provides a high-level interface for the Taos TLS1410R linear CCD array sensor. - */ - - #include "mbed.h" - - #ifndef TLS1410R_H - #define TLS1410R_H - -class TLS1410R -{ -public: - // set up with the two DigitalOut ports (SI and clock), and the - // analog in port for reading the currently selected pixel value - TLS1410R(PinName siPort, PinName clockPort, PinName aoPort); - - // Integrate light and read the pixels. Fills in pix[] with the pixel values, - // scaled 0-0xffff. n is the number of pixels to read; if this is less than - // the total number of pixels npix, we'll read every mth pixel, where m = npix/n. - // E.g., if you want 640 pixels out of 1280 on the sensor, we'll read every - // other pixel. If you want 320, we'll read every fourth pixel. - // Before reading, we'll pause for integrate_us additional microseconds during - // the integration phase; use 0 for no additional integration time. - void read(uint16_t *pix, int n, int integrate_us); - - // clock through all pixels to clear the array - void clear(); - - // number of pixels in the array - static const int nPix = 1280; - - -private: - DigitalOut si; - DigitalOut clock; - AnalogIn ao; -}; - -#endif /* TLS1410R_H */