ESP8266 Support WIKI

User Tools

Site Tools


arduino-docs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
arduino-docs [2015/05/05 19:10]
russmathis
arduino-docs [2015/07/19 01:19] (current)
apedro [EEPROM]
Line 11: Line 11:
  
 ==== EEPROM ==== ==== EEPROM ====
- 
 EEPROM functionality is similar to the standard Arduino library with the exception of having to declare memory size and committing writes. EEPROM functionality is similar to the standard Arduino library with the exception of having to declare memory size and committing writes.
- 
 ===example=== ===example===
- 
 <code c++> <code c++>
 #include <​EEPROM.h>​ #include <​EEPROM.h>​
Line 34: Line 31:
 Find the EEPROMAnything.h and add EEPROM.commit();​ after the EEPROM.write(ee++,​ *p++); Find the EEPROMAnything.h and add EEPROM.commit();​ after the EEPROM.write(ee++,​ *p++);
  
-EEPROMAnything provides nice functionality to save any type of variables ​including structers. +EEPROMAnything provides nice functionality to save any type of variable ​including structers.
 <code c++> <code c++>
 #include <​EEPROMAnything.h>​ #include <​EEPROMAnything.h>​
 +
 struct eepromInfoType struct eepromInfoType
 { {
-     ​uint8_t ​My8In;+     ​uint8_t ​MyUnsigned8BitInt;
      char MyCharArray[25]      char MyCharArray[25]
 } myStructOriginal,​ myStructCopy;​ } myStructOriginal,​ myStructCopy;​
Line 46: Line 43:
 void setup() void setup()
 { {
-     myStruct.My8Int ​= 0; //assign some value +     myStructOriginal.MyUnsigned8BitInt ​= 0; //assign some value 
-     ​strcpy( MyCharArray,​ "Less than 25 chars" ); //assign some value+     ​strcpy( ​myStructOriginal.MyCharArray,​ "Less than 25 chars" ); //assign some value
      ​EEPROM_writeAnything( 0, myStructOriginal ); //remember to modify EEPROM_writeAnything by adding ​  ​.commit().      ​EEPROM_writeAnything( 0, myStructOriginal ); //remember to modify EEPROM_writeAnything by adding ​  ​.commit().
      //​Lets read it back      //​Lets read it back
Line 53: Line 50:
 } }
  
-void loop() {//nothing here}+void loop() 
 +{ 
 +//nothing here 
 +}
 </​code>​ </​code>​
  
Line 116: Line 116:
  
 **Connect with static IP** **Connect with static IP**
 +
 +If you experience problems regarding DNS resolving check out https://​github.com/​esp8266/​Arduino/​issues/​369
 <code c> <code c>
 #include <​ESP8266WiFi.h>​ #include <​ESP8266WiFi.h>​
arduino-docs.1430853032.txt.gz · Last modified: 2015/05/05 19:10 by russmathis