LP Long Distance IR Vision Robot

Dependencies:   max77650_charger_sample BufferedSerial SX1276GenericLib Adafruit-MotorShield NEO-6m-GPS MAX17055_EZconfig Adafruit_GFX USBDeviceHT Adafruit-PWM-Servo-Driver

Revision:
33:52c898aca207
Parent:
32:b108ed6096b0
Child:
34:f31a6b53d4ea
Child:
35:bae9b236070b
--- a/main.cpp	Mon Jul 30 05:53:55 2018 +0000
+++ b/main.cpp	Tue Jul 31 02:00:57 2018 +0000
@@ -183,8 +183,8 @@
                 onDataWritten_curr_ble_to_slave[0] = direction;
                 onDataWritten_curr_ble_to_slave[1] = button_state;
                 
-                dprintf("direction: %d\n", direction);
-                dprintf("button_state: %d\n", button_state);      
+                //dprintf("direction: %d\n", direction);
+                //dprintf("button_state: %d\n", button_state);      
             }
         }
     #endif
@@ -481,10 +481,22 @@
                     // Increment frame counter
                     frame_idx = frame_idx +1;
                 }
-                wait_ms( 20 );
-                memcpy(prev_raw_frame_to_master, curr_raw_frame_to_master, sizeof(curr_raw_frame_to_master));
-
             #endif
+            #if defined(RASPBERRY_PI)
+                if( memcmp(prev_raw_frame_to_master, curr_raw_frame_to_master, sizeof(curr_raw_frame_to_master)) != 0 )
+                {
+                    char grid_eye_msg[130];
+                    grid_eye_msg[0]=0x55;
+                    grid_eye_msg[1]=0xaa;
+                    for (int idx = 0; idx < 128; idx++)
+                        grid_eye_msg[idx+2] = curr_raw_frame_to_master[idx];
+                    //pc.printf(grid_eye_msg);
+                    for (int idx = 0; idx < 130; idx++)
+                    pc.putc(grid_eye_msg[idx]);
+                }
+            #endif
+            wait_ms( 20 );
+            memcpy(prev_raw_frame_to_master, curr_raw_frame_to_master, sizeof(curr_raw_frame_to_master));
         #endif      
         
         /***************************************************************************