Sigfox Communication library, allowing you to use any kind of UART able Sigfox Transmitter
Fork of Sigfox_Com by
sigfox.h
00001 #ifndef SIGFOX_H 00002 #define SIGFOX_H 00003 00004 #include "mbed.h" 00005 00006 //Define your baudrate and pins here 00007 #define BAUDRATE 9600 00008 #define PIN_RX p19 00009 #define PIN_TX p18 00010 00011 class Sigfox_ { 00012 00013 public: 00014 Sigfox_(); 00015 //Sigfox_(PinMode TX, PinMode RX); 00016 00017 void begin(); 00018 bool isReady(); 00019 bool send(const void* data, uint8_t len); 00020 unsigned long getID(); 00021 unsigned long getPAC(); 00022 bool setPowerMode(uint8_t power); 00023 00024 enum RETURN_CODE { 00025 OK = 'O', 00026 KO = 'K', 00027 SENT = 'S' 00028 }; 00029 00030 private: 00031 //Serial device(p9, p10); 00032 //Serial _serial; 00033 unsigned long _lastSend; 00034 00035 uint8_t _nextReturn(); 00036 }; 00037 00038 extern Sigfox_ Sigfox; 00039 #endif
Generated on Sat Jul 16 2022 02:04:59 by
1.7.2
