These are chat archives for esp8266/Arduino

4th
May 2017
Saurabh Vyas
@saurabhvyas
May 04 2017 08:26
@majklovec Thanks I will have a look
Ivan Grokhotkov
@igrr
May 04 2017 09:28
Folks, anyone else has trouble accessing http://arduino.esp8266.com/ now?
Mehrdad K
@mkeyno
May 04 2017 09:29
I do
Martin Sloup
@arcao
May 04 2017 09:35
Me too, DNS name not resolved
Ivan Grokhotkov
@igrr
May 04 2017 09:38
Mehrdad K
@mkeyno
May 04 2017 09:38
No file specified.
Ivan Grokhotkov
@igrr
May 04 2017 09:39
Which means that one works.
Both names point to the same server, so i guess the issue is with esp8266.com's DNS records
Mehrdad K
@mkeyno
May 04 2017 09:39
but this wont work http://www.igrr.me/
Ivan Grokhotkov
@igrr
May 04 2017 09:40
there's no such name, www.igrr.me (i have never registered that)
rodrigocirilo
@rodrigocirilo
May 04 2017 15:47
@rodrigocirilo
Could you help me on another question.
How to save in eeprom of arduino nano or nodemcu, a TAG of RFID card? And the number that retreats is generally thus an example: 7A 12 E5 90 being a string.
And how many eeprom addresses does the nodemcu have?
riataman
@riataman
May 04 2017 17:01
it reallity the ESP8266 doesn't have any EEPROM
it has a library that emulates Arduino(AVR) EEPROM
but actually its using the ESP flash
if you don't need to be compatible with other boards you can use SPIFFS directly
that's a filesystem for the esp flash
there are some examples in here: https://github.com/pellepl/spiffs/wiki/Using-spiffs
it basically works the same as a computer filesystem (with a lot of limitations)
Martin Ayotte
@martinayotte
May 04 2017 17:37
@rodrigocirilo , the emulated EEPROM is normally using 4096 bytes.
Steve Nelson
@zenmanenergy
May 04 2017 18:19
@rodrigocirilo here's a really simple example of writing to a text file, then reading it and spitting it back to the monitor.
#include <FS.h>

void setup() {
  Serial.begin(115200);
  Serial.println("hello file system!");

  //start the file system
  SPIFFS.begin();

  Serial.println("Write a text file to the file system");
  Serial.println("the filename is /hellofiles.txt");

  File writeFile = SPIFFS.open("/hellofiles.txt","w");
  writeFile.print("hello world!");
  writeFile.close();
  Serial.println("file written! hooya!");

  Serial.println("read the text file");


  File readFile = SPIFFS.open("/hellofiles.txt","r");
  String fileContents="";
  while (readFile.available()) {
    fileContents+=char(readFile.read());
  }
  readFile.close();
  Serial.println(fileContents);
}

void loop() {

}
copercini
@copercini
May 04 2017 18:22
You also can use Arduino Extended Database Library: https://github.com/jwhiddon/EDB
Steve Nelson
@zenmanenergy
May 04 2017 18:25
damn it. I have shit to do! That looks awesome and now I want to learn how to use it.
mega-hz
@mega-hz
May 04 2017 18:52
does anyone has a real simple solution for a wlan switch? (esp, ip-on off or so)
rodrigocirilo
@rodrigocirilo
May 04 2017 19:21
@martinayotte Can I start from address 0? Then 1, 2 etc.
rodrigocirilo
@rodrigocirilo
May 04 2017 19:27

@zenmanenergy Thanks, but did not help me, we wanted to use the commands: eeprom.write and eeprom.read

The one you exemplified does not use that.

Steve Nelson
@zenmanenergy
May 04 2017 19:46
i know.
the downside of eeprom is it is relatively limited space. files are WAY more flexible.
if you're deadset on using eeprom. here is some example code that will allow you to use it in a pretty flexible way. https://github.com/zenmanenergy/ESP8266-Arduino-Examples/tree/master/helloWorld_eeprom
Michael Miller
@Makuna
May 04 2017 20:01
@rodrigocirilo If you write often or large collections to EEPROM, I would suggest switching to SPIFFs. There are tons of examples for Arduino on EEPROM.