![](/media/cache/profiles/profile_pic_for_github_less_than_1MB.jpg.50x50_q85.jpg)
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: SX1276GenericPingPong/GenericPingPong.h
- Revision:
- 42:911770814147
- Parent:
- 28:0ed92c590607
--- a/SX1276GenericPingPong/GenericPingPong.h Wed Aug 01 08:32:21 2018 +0000 +++ b/SX1276GenericPingPong/GenericPingPong.h Wed Aug 15 04:06:09 2018 +0000 @@ -36,10 +36,17 @@ const uint8_t PingMsg[] = { 0xff, 0xff, 0x00, 0x00, 'P', 'I', 'N', 'G'};// "PING"; const uint8_t PongMsg[] = { 0xff, 0xff, 0x00, 0x00, 'P', 'O', 'N', 'G'};// "PONG"; +// This keeps track of how many times a transmission times out. +static int RxTimeoutCount = 0; - +/*! + * @brief Function that sets up the LoRa radio device + */ int SX1276PingPongSetup(uint8_t *BufferTxFromMain, uint8_t *BufferRxFromMain); +/*! + * @brief Function that is called in main program to handle LoRa communications + */ int SX1276PingPong(void); /* @@ -80,4 +87,10 @@ */ void OnCadDone(void *radio, void *userThisPtr, void *userData); +/*! + * @brief Returns how many times a transmition is not received + */ +int numOfRxTimeouts(); + + #endif // __MAIN_H__ \ No newline at end of file