Sigfox Communication library, allowing you to use any kind of UART able Sigfox Transmitter
Dependents: TestVirtualisation
sigfox.h
- Committer:
- RB62680
- Date:
- 2016-03-12
- Revision:
- 2:975b82a3cde0
- Parent:
- 0:996eb84c895e
- Child:
- 3:3ef537a95c15
File content as of revision 2:975b82a3cde0:
#ifndef SIGFOX_H #define SIGFOX_H #include "mbed.h" //Define your baudrate and pins here #define BAUDRATE 9600 #define PIN_RX p19 #define PIN_TX p18 class Sigfox_ { public: Sigfox_(); //Sigfox_(PinMode TX, PinMode RX); void begin(); bool isReady(); bool send(const void* data, uint8_t len); unsigned long getID(); unsigned long getPAC(); bool setPowerMode(uint8_t power); enum RETURN_CODE { OK = 'O', KO = 'K', SENT = 'S' }; private: //Serial device(p9, p10); //Serial _serial; unsigned long _lastSend; uint8_t _nextReturn(); }; extern Sigfox_ Sigfox; #endif