Code APP3
Dependencies: mbed EthernetInterface WebSocketClient mbed-rtos BufferedSerial
Fork of APP3_Lab by
parser.cpp
- Committer:
- JayMcGee
- Date:
- 2017-09-30
- Revision:
- 3:a07b74f94890
- Child:
- 4:ed53c87777f6
File content as of revision 3:a07b74f94890:
void ReadFile() { FILE *fp = fopen("/config.txt", "r"); // Ouvrir config.txt pour lecture seulement if(fp == NULL) { pc.printf("Failed to find configuration file. \n\r") return -1; } else { pc.printf("Config file opened. \n\r"); fscanf(set,"%s",A); // read PanId fscanf(set,"%s",B); // read URL printf(fp,"PanId : %s\r\n",A); // Display PanId printf(fp,"ServeurURL : %s\r\n",B); // Display URL fclose(fp); } }