Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Tejas H
@CodingCreate101
This is some string
123456789012
abcdefghijkl
Sun
greenlight
1
randomStringHere  ng
newnum 89012
booya ghijkl
ran
something 
1

This is code algorithm
1) create a structure
2) Create new structure(roughly, an object)
3) Store values manually
4) Write those values to EEPROM using EEPROM.put() method.
5) Change values in the code manually.
6) Read values back from EEPROM to check whether the info was written in EEPROM or not.

But I am getting weird output on serial monitor.

ongvanor
@ongvanor
can anyone help? im having this error rst cause:2, boot mode:(3,7)
blob
if i add that in my code in the setup() it shows that. but if i remove it , it runs okay. what could be the problem?
Tejas H
@CodingCreate101
It's because of EEPROM.commit(). Remove that line and test it. I am facing similar issues.
ongvanor
@ongvanor
errr but i need that line to save the settings of the eeprom
Tejas H
@CodingCreate101
Wait, there is also EEPROM.write(). That might be additional possibility for the problem.
Of course. How many bytes you have allocated for EEPROM?
ongvanor
@ongvanor
it ranges to 512 right i just used until address 100
Tejas H
@CodingCreate101
No, you can use more than that. Try increasing that value to 1024 and test. I guess the error is because of over flow. I am not certain about it, yet.
ongvanor
@ongvanor
hmmm somewhere in EEPROM.begin(512)? so i should change it to 1024?
Tejas H
@CodingCreate101
Yeah, try that.
ongvanor
@ongvanor
okay trying right now
the error is still the same
Tejas H
@CodingCreate101
Cross your fingers :)
Oops.
ongvanor
@ongvanor
lol haha still error i tried this code in mega. but here in the esp8266 doesnt work wierd
Tejas H
@CodingCreate101
Wait, previously what values you are storing? I meant, which data type values?
ongvanor
@ongvanor
if im not mistaken char lol, im just wonder why it wont work
i have a part of my code in setup which is this
blob
but it runs okay just the first image code i sent gives me those error
my aim is that the user can save the SSID and pass via mobile but if the user wants to erase the value of the SSID and Pass in the eeprom the user can press hte button to erase them
Tejas H
@CodingCreate101
Now, in first image code, replace 0(zero) with \0 and try .
ongvanor
@ongvanor
I'll try to omit some of the codes line by line just to see where the error occurs
blob
okay i got where the error occurs it starts in the while loop
Tejas H
@CodingCreate101
Its because of EEPROM.write()
Try this line:
EEPROM.write(i, '\0');
ongvanor
@ongvanor
that part works just the while loop gives the error
blob
this code runs fine, as you can see I comment out the while loop, the error is in the while loop
Tejas H
@CodingCreate101
That looks strange
ongvanor
@ongvanor
maybe in my firmware version?
is there anyway to display the firmware version?
Clemens Kirchgatterer
@everslick
guys, you cannot write strings that are stored in a 'String' object like that. (i'm referring to the struct above!) @tejas007tez
String is a complex type, it will only contain a pointer to the real data it holds and not the data itself. writing that String object to the EEPROM is bogus.
Tejas H
@CodingCreate101
Thanks for responding. So, it should be character array, then?
Ohh right. Now I have realised. So that's the reason why I was getting weird output. It's because of inefficient way of handling of address' right?
Nikolas Beutler
@biacz
hey guys, i got this and this and it does not work. any advice whats wrong? http://imgur.com/a/tABZR - https://gist.github.com/biacz/d1255d44841736e09f1234d0e4418cae
Lan-Hekary
@Lan-Hekary
I am Wondering why nobody is looking in the Pull requests ?? There is a lot of them ..
ongvanor
@ongvanor
hi guys how to use pin D4 to pin D9 of the NodeMCU esp8266-12e dev board?
Nikolas Beutler
@biacz
@ongvanor what do you mean exactly?
just use as described here
ongvanor
@ongvanor
im using pin D0 to D4 in output for LEDS i want to use D5 to D8 as input pins is that possible?
Nikolas Beutler
@biacz
sure
ongvanor
@ongvanor
so i can say that pinMode(D4,INPUT); to declare as input?
Nikolas Beutler
@biacz
i always use the GPIO numbers