Lepton sensor on the DISCO-F746NG board. Based on the rapberry_pi example code at https://github.com/groupgets/LeptonModule
Dependencies: mbed-src BSP_DISCO_F746NG LCD_DISCO_F746NG
main.cpp
- Committer:
- Patrik Ryd
- Date:
- 2015-12-09
- Revision:
- 2:a0eb7bff9571
- Parent:
- 1:fcfdd41f22a7
- Child:
- 3:3b3517e9fa11
File content as of revision 2:a0eb7bff9571:
#include "mbed.h" #define LEPTON_FRAME_SIZE (164) Serial pc(USBTX, USBRX); SPI lepton_spi(SPI_MOSI, SPI_MISO, SPI_SCK); DigitalOut spi_cs(SPI_CS); static uint8_t lepton_frame[LEPTON_FRAME_SIZE]; static uint16_t lepton_image[80][80]; void setup(void) { lepton_spi.format(8,3); lepton_spi.frequency(20000000); spi_cs = 1; spi_cs = 0; spi_cs = 1; wait_ms(185); } void get_frame(void) { int i; spi_cs = 0; for(i=0;i<LEPTON_FRAME_SIZE;i++) { lepton_frame[i] = leptonspi.write(0x00); } spi_cs = 1; } int main() { pc.printf("Alive\n"); }