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 Devin Alexander

Committer:
dev_alexander
Date:
Wed Jul 18 18:52:30 2018 +0000
Revision:
23:f74a50977593
Child:
24:e8d03912f303
I added file global_buffers.h and also reworked a portion of the main.cpp to adjust to the new method of using global buffers defined in a different file.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dev_alexander 23:f74a50977593 1 /** Description:
dev_alexander 23:f74a50977593 2 * This File is responsible for defining the buffers that will be used in
dev_alexander 23:f74a50977593 3 * various areas of the program. The buffers that are defined here will be
dev_alexander 23:f74a50977593 4 * refferenced in the main.cpp and will be filled with data in one of two ways:
dev_alexander 23:f74a50977593 5 *
dev_alexander 23:f74a50977593 6 * 1. The buffers will be filled with data upon receiving a successful payload
dev_alexander 23:f74a50977593 7 * transmission over LoRa. In GenericPingPong.cpp, the function OnRxDone()
dev_alexander 23:f74a50977593 8 * will call the function fillGlobalBufsWithPayload() that is responsible for
dev_alexander 23:f74a50977593 9 * filling the appropriate buffers with the payload data that was received
dev_alexander 23:f74a50977593 10 * by either the master or slave device by the other device that sent it.
dev_alexander 23:f74a50977593 11 *
dev_alexander 23:f74a50977593 12 * 2. The buffers will be used to fill up a payload buffer that will be sent
dev_alexander 23:f74a50977593 13 * over LoRa by either the master or slave device to the receiving device.
dev_alexander 23:f74a50977593 14 * The function fillPayloadWithGlobalBufs() will use the global buffers that
dev_alexander 23:f74a50977593 15 * are filled with data for various sensors in the main.cpp to construct a
dev_alexander 23:f74a50977593 16 * payload to deliver to the other device when SX1276PingPong() is called
dev_alexander 23:f74a50977593 17 * in file GenericPingPong.cpp.
dev_alexander 23:f74a50977593 18 *
dev_alexander 23:f74a50977593 19 */
dev_alexander 23:f74a50977593 20
dev_alexander 23:f74a50977593 21 #ifndef __GLOBAL_BUFFERS_H__
dev_alexander 23:f74a50977593 22 #define __GLOBAL_BUFFERS_H__
dev_alexander 23:f74a50977593 23
dev_alexander 23:f74a50977593 24 /***************************************************************************
dev_alexander 23:f74a50977593 25 * Grid Eye Sensor Information
dev_alexander 23:f74a50977593 26 **************************************************************************/
dev_alexander 23:f74a50977593 27 #if defined(TARGET_MAX32630FTHR) // Master Device: BLE-to-LoRa Gateway
dev_alexander 23:f74a50977593 28 char curr_raw_frame_data_from_slave[128];
dev_alexander 23:f74a50977593 29 char prev_raw_frame_data_from_slave[128];
dev_alexander 23:f74a50977593 30 int16_t conv_frame_data_from_slave[64];
dev_alexander 23:f74a50977593 31 #elif defined(TARGET_MAX32620FTHR) // Client Device: LoRa Controlled Robot
dev_alexander 23:f74a50977593 32 char curr_raw_frame_data_to_master[128];
dev_alexander 23:f74a50977593 33 #endif
dev_alexander 23:f74a50977593 34
dev_alexander 23:f74a50977593 35
dev_alexander 23:f74a50977593 36 #endif // __GLOBAL_BUFFERS_H__