added spectrometer timeout
Dependencies: SDFileSystem mbed
Fork of All_Combined_Real2 by
Diff: main.cpp
- Revision:
- 5:6532c5a5f576
- Parent:
- 4:70411c8dadcc
- Child:
- 6:059312376781
--- a/main.cpp Tue Mar 22 17:08:13 2016 +0000 +++ b/main.cpp Wed Mar 23 14:32:41 2016 +0000 @@ -3,6 +3,7 @@ #include "SDFileSystem.h" #include "SPI.h" #include "temp_sensor.h" +#include "XBeeLib.h" #define NUM_PIXELS 2048 #define BUF_SIZE 1024 @@ -47,7 +48,7 @@ void read_pixels() { - int data[NUM_PIXELS]; + char data[NUM_PIXELS]; for (int i = 0; i < NUM_PIXELS; i++) { while (!pixel_rdy); @@ -67,6 +68,8 @@ pc.printf("\r\n"); fprintf(fpData, "\r\n"); fclose(fpData); + + XBeeSend((const char *)data, 2048); } void gps_read() { @@ -105,6 +108,7 @@ duino.baud(9600); pc.printf("Initializing ...\r\n"); + XBeeInit(&pc); fifo_cs = 1; trigger = 0; wait(0.5f); @@ -116,7 +120,7 @@ led = !led; - gps_read(); +// gps_read(); check_temp(); // Display result