Real-time bike tracker using Adafruit Ultimate GPS, Huzzah wifi, and Pubnub
Dependencies: MBed_Adafruit-GPS-Library mbed
PubNub.h@1:0701bf58c9fa, 2017-04-19 (annotated)
- Committer:
- ECE4180
- Date:
- Wed Apr 19 01:00:53 2017 +0000
- Revision:
- 1:0701bf58c9fa
- Child:
- 2:834f8d2ebe3f
GPS String sending to Pubnub and working.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ECE4180 | 1:0701bf58c9fa | 1 | #include "mbed.h" |
ECE4180 | 1:0701bf58c9fa | 2 | #include "Huzzah.h" |
ECE4180 | 1:0701bf58c9fa | 3 | |
ECE4180 | 1:0701bf58c9fa | 4 | #include "string" |
ECE4180 | 1:0701bf58c9fa | 5 | |
ECE4180 | 1:0701bf58c9fa | 6 | |
ECE4180 | 1:0701bf58c9fa | 7 | extern Serial pc; |
ECE4180 | 1:0701bf58c9fa | 8 | |
ECE4180 | 1:0701bf58c9fa | 9 | |
ECE4180 | 1:0701bf58c9fa | 10 | class PubNub |
ECE4180 | 1:0701bf58c9fa | 11 | { |
ECE4180 | 1:0701bf58c9fa | 12 | public: |
ECE4180 | 1:0701bf58c9fa | 13 | PubNub(string pubkey, string subkey, string channel, PinName tx_pin, PinName rx_pin); |
ECE4180 | 1:0701bf58c9fa | 14 | void send_message(string message); |
ECE4180 | 1:0701bf58c9fa | 15 | void send_message(char* message); |
ECE4180 | 1:0701bf58c9fa | 16 | // for sending serial data to huzzah |
ECE4180 | 1:0701bf58c9fa | 17 | Huzzah huz; |
ECE4180 | 1:0701bf58c9fa | 18 | |
ECE4180 | 1:0701bf58c9fa | 19 | private: |
ECE4180 | 1:0701bf58c9fa | 20 | string pubkey; |
ECE4180 | 1:0701bf58c9fa | 21 | string subkey; |
ECE4180 | 1:0701bf58c9fa | 22 | string channel; |
ECE4180 | 1:0701bf58c9fa | 23 | string conn_host; |
ECE4180 | 1:0701bf58c9fa | 24 | string conn_port; |
ECE4180 | 1:0701bf58c9fa | 25 | }; |