This is example code that can get you started with building your own IR vision robot that communicates over LoRa
Dependencies: Adafruit-MotorShield Adafruit-PWM-Servo-Driver Adafruit_GFX BufferedSerial MAX17055_EZconfig NEO-6m-GPS SX1276GenericLib USBDeviceHT max32630fthr max77650_charger_sample
Fork of MAX326xxFTHR_LoRa_Example_test by
Diff: global_buffers.h
- Revision:
- 23:f74a50977593
- Child:
- 24:e8d03912f303
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/global_buffers.h Wed Jul 18 18:52:30 2018 +0000 @@ -0,0 +1,36 @@ +/** Description: + * This File is responsible for defining the buffers that will be used in + * various areas of the program. The buffers that are defined here will be + * refferenced in the main.cpp and will be filled with data in one of two ways: + * + * 1. The buffers will be filled with data upon receiving a successful payload + * transmission over LoRa. In GenericPingPong.cpp, the function OnRxDone() + * will call the function fillGlobalBufsWithPayload() that is responsible for + * filling the appropriate buffers with the payload data that was received + * by either the master or slave device by the other device that sent it. + * + * 2. The buffers will be used to fill up a payload buffer that will be sent + * over LoRa by either the master or slave device to the receiving device. + * The function fillPayloadWithGlobalBufs() will use the global buffers that + * are filled with data for various sensors in the main.cpp to construct a + * payload to deliver to the other device when SX1276PingPong() is called + * in file GenericPingPong.cpp. + * + */ + +#ifndef __GLOBAL_BUFFERS_H__ +#define __GLOBAL_BUFFERS_H__ + +/*************************************************************************** + * Grid Eye Sensor Information + **************************************************************************/ +#if defined(TARGET_MAX32630FTHR) // Master Device: BLE-to-LoRa Gateway + char curr_raw_frame_data_from_slave[128]; + char prev_raw_frame_data_from_slave[128]; + int16_t conv_frame_data_from_slave[64]; +#elif defined(TARGET_MAX32620FTHR) // Client Device: LoRa Controlled Robot + char curr_raw_frame_data_to_master[128]; +#endif + + +#endif // __GLOBAL_BUFFERS_H__ \ No newline at end of file