Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
wifi_example.h@1:8512a7d76959, 2019-11-07 (annotated)
- Committer:
- dadangjia
- Date:
- Thu Nov 07 23:56:29 2019 +0000
- Revision:
- 1:8512a7d76959
- Parent:
- 0:cbe8a0553d45
- Child:
- 2:a327e877a94c
STM32F103C8T6,ONENET,ESP8266,DH11
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TaylorGy | 0:cbe8a0553d45 | 1 | #ifndef WIFI_EXAMPLE_H_H |
| TaylorGy | 0:cbe8a0553d45 | 2 | #define WIFI_EXAMPLE_H_H |
| TaylorGy | 0:cbe8a0553d45 | 3 | |
| TaylorGy | 0:cbe8a0553d45 | 4 | #include "mbed.h" |
| TaylorGy | 0:cbe8a0553d45 | 5 | #include "Common.h" |
| TaylorGy | 0:cbe8a0553d45 | 6 | #include "EdpKit.h" |
| TaylorGy | 0:cbe8a0553d45 | 7 | #include "cJSON.h" |
| TaylorGy | 0:cbe8a0553d45 | 8 | #include "ESP8266.h" |
| TaylorGy | 0:cbe8a0553d45 | 9 | |
| TaylorGy | 0:cbe8a0553d45 | 10 | #include <time.h> |
| TaylorGy | 0:cbe8a0553d45 | 11 | #include <stdio.h> |
| TaylorGy | 0:cbe8a0553d45 | 12 | #include <stdlib.h> |
| TaylorGy | 0:cbe8a0553d45 | 13 | #include <string.h> |
| TaylorGy | 0:cbe8a0553d45 | 14 | |
| dadangjia | 1:8512a7d76959 | 15 | #define DEVICEID "518299613" |
| dadangjia | 1:8512a7d76959 | 16 | #define APIKEY "D1cJ=yPG0qAHmWd3G7cNivNrj2w=" |
| dadangjia | 1:8512a7d76959 | 17 | #define APNAME "OrayBox-4DBE" |
| dadangjia | 1:8512a7d76959 | 18 | #define APPASSWD "zhuxiweiyang" |
| TaylorGy | 0:cbe8a0553d45 | 19 | #define TCPNUM 0 |
| TaylorGy | 0:cbe8a0553d45 | 20 | #define TCPADD "jjfaedp.hedevice.com" |
| TaylorGy | 0:cbe8a0553d45 | 21 | #define TCPPORT 876 |
| TaylorGy | 0:cbe8a0553d45 | 22 | |
| TaylorGy | 0:cbe8a0553d45 | 23 | #define MAX_SEND_BUF_LEN 1024 |
| TaylorGy | 0:cbe8a0553d45 | 24 | |
| TaylorGy | 0:cbe8a0553d45 | 25 | extern EdpPacket* send_pack; |
| TaylorGy | 0:cbe8a0553d45 | 26 | extern char send_buf[MAX_SEND_BUF_LEN]; |
| TaylorGy | 0:cbe8a0553d45 | 27 | extern char read_buf[MAX_SEND_BUF_LEN]; |
| TaylorGy | 0:cbe8a0553d45 | 28 | |
| TaylorGy | 0:cbe8a0553d45 | 29 | extern void connectInit(void); |
| TaylorGy | 0:cbe8a0553d45 | 30 | extern void sendJsonDat(char* dataName, float data); |
| TaylorGy | 0:cbe8a0553d45 | 31 | extern void sendData(char* dataName, float data); |
| TaylorGy | 0:cbe8a0553d45 | 32 | extern void devLink(const char* devid, const char* auth_key); |
| TaylorGy | 0:cbe8a0553d45 | 33 | extern int checkSocketStatus(void); |
| TaylorGy | 0:cbe8a0553d45 | 34 | |
| TaylorGy | 0:cbe8a0553d45 | 35 | |
| TaylorGy | 0:cbe8a0553d45 | 36 | #endif |
| TaylorGy | 0:cbe8a0553d45 | 37 |