1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

Merge branch 'WifiSendP' of https://github.com/Makuna/Arduino into Makuna-WifiSendP

Conflicts:
	README.md
This commit is contained in:
Ivan Grokhotkov
2015-07-28 18:15:20 +03:00
4 changed files with 104 additions and 26 deletions

View File

@ -78,6 +78,32 @@ Both `Serial` and `Serial1` objects support 5, 6, 7, 8 data bits, odd (O), even
The Program memory features work much the same way as on a regular Arduino; placing read only data and strings in read only memory and freeing heap for your application.
The important difference is that on the ESP8266 the literal strings are not pooled. This means that the same literal string defined inside a `F("")` and/or `PSTR("")` will take up space for each instance in the code. So you will need to manage the duplicate strings yourself.
There is one additional helper macro to make it easier to pass ```const PROGMEM``` strings to methods that take a ```__FlashStringHelper``` called ```FPSTR()```. The use of this will help make it easier to pool strings.
Not pooling strings...
```С++
String response1;
response1 += F("http:");
...
String response2;
response2 += F("http:");
```
using FPSTR would become...
```С++
const char HTTP[] PROGMEM = "http:";
...
{
String response1;
response1 += FPSTR(HTTP);
...
String response2;
response2 += FPSTR(HTTP);
}
```
## WiFi(ESP8266WiFi library)
This is mostly similar to WiFi shield library. Differences include: