send GPS data via LoRaWAN

Dependencies:   TinyGPS mbed ADXL345_I2C Sht31

Committer:
koyo_take
Date:
Sat Jun 24 03:45:00 2017 +0000
Revision:
0:97a57be77fbb
Child:
1:195da8230785
initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
koyo_take 0:97a57be77fbb 1 #if !defined(EEAPP1_H)
koyo_take 0:97a57be77fbb 2 #define EEAPP1_H
koyo_take 0:97a57be77fbb 3 #include "mbed.h"
koyo_take 0:97a57be77fbb 4 #include "types.h"
koyo_take 0:97a57be77fbb 5
koyo_take 0:97a57be77fbb 6 enum EeabLedState {
koyo_take 0:97a57be77fbb 7 LED_OFF,
koyo_take 0:97a57be77fbb 8 LED_ON,
koyo_take 0:97a57be77fbb 9 LED_BLINK_FAST,
koyo_take 0:97a57be77fbb 10 LED_BLINK_MID,
koyo_take 0:97a57be77fbb 11 LED_BLINK_SLOW,
koyo_take 0:97a57be77fbb 12 };
koyo_take 0:97a57be77fbb 13
koyo_take 0:97a57be77fbb 14 class Eeabp1
koyo_take 0:97a57be77fbb 15 {
koyo_take 0:97a57be77fbb 16 public:
koyo_take 0:97a57be77fbb 17 Eeabp1();
koyo_take 0:97a57be77fbb 18 int setLedState(EeabLedState state);
koyo_take 0:97a57be77fbb 19 void loop(void);
koyo_take 0:97a57be77fbb 20 int debug(const char * format, ...);
koyo_take 0:97a57be77fbb 21 int setLoRaPower(bool on);
koyo_take 0:97a57be77fbb 22 int sendLoRaString(const char * format, ...);
koyo_take 0:97a57be77fbb 23 void setGrovePower(bool on);
koyo_take 0:97a57be77fbb 24
koyo_take 0:97a57be77fbb 25 private:
koyo_take 0:97a57be77fbb 26 DigitalOut pwr_en;
koyo_take 0:97a57be77fbb 27 /* state LED */
koyo_take 0:97a57be77fbb 28 DigitalOut led;
koyo_take 0:97a57be77fbb 29 EeabLedState led_state;
koyo_take 0:97a57be77fbb 30 /* LoRa */
koyo_take 0:97a57be77fbb 31 RawSerial *serial;
koyo_take 0:97a57be77fbb 32 DigitalOut lora_power;
koyo_take 0:97a57be77fbb 33 DigitalOut lora_reset;
koyo_take 0:97a57be77fbb 34 bool lora_enabled;
koyo_take 0:97a57be77fbb 35 /* Grove */
koyo_take 0:97a57be77fbb 36 DigitalOut grove_power;
koyo_take 0:97a57be77fbb 37 bool grove_enabled;
koyo_take 0:97a57be77fbb 38
koyo_take 0:97a57be77fbb 39 void flushSerial();
koyo_take 0:97a57be77fbb 40 int chkSerialChar(const char,uint16_t);
koyo_take 0:97a57be77fbb 41 int waitSerialChar(const char,uint16_t);
koyo_take 0:97a57be77fbb 42 int chkSerialCharOk();
koyo_take 0:97a57be77fbb 43 int chkSerialCharRes(char);
koyo_take 0:97a57be77fbb 44 };
koyo_take 0:97a57be77fbb 45
koyo_take 0:97a57be77fbb 46 #endif /* !defined(EEAPP1_H) */