-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EEPROM.put and get does not work #22
Comments
From @Whocareswhowins on March 24, 2017 22:46 Yes you are correct it does not work. Sent from my iPhone 4s! On 24 Mar 2017, at 15:46, elik745i notifications@github.com wrote: EEPROM.put and get requests does not work with newEEPROM library, can anyone fix it? or suggest the way forward... — |
From @elik745i on March 25, 2017 5:1 how can it be fixed? maybe someone has more programming skills to do that? I'm currently going deep into the coding to try and fix it... I need to use that feature in my project at http://www.voltrans.az/?page_id=1969&lang=en |
From @per1234 on March 25, 2017 5:32 Just use the standard EEPROM library included with the Arduino IDE but make sure to leave alone the EEPROM addresses Ariadne uses for its configuration settings. Ariadne uses EEPROM addresses 0-26 for network settings and 27-63 for the password used in the EthernetReset library. If you're not using the password then you can use EEPROM addresses 27-63 for other purposes. The NewEEPROM library just makes sure you won't use those addresses, there's no magic to it. |
From @elik745i on March 25, 2017 10:48 I'm afraid it does not work like that. Ariadne library is linked to newEEPROM library and even if I'm not declaring it and as you said using standard EEPROM library it's screaming compillation errors. Try this sketch and you'll see what do I ment: A simple web server that shows the value of the analog input pins. Circuit:
created 18 Dec 2009 */ #include <NetEEPROM.h> EthernetReset reset(8080); // Enter a MAC address and IP address for your controller below. // Initialize the Ethernet server library void setup() { // Open serial communications and wait for port to open: // start the Ethernet connection and the server: void loop() { |
From @per1234 on March 25, 2017 12:44 I see. You can get around that issue by using avr-libc's eeprom.h. You still won't be able to use
I've never liked the NewEEPROM system. I guess it was intended to be more user friendly by hiding the issue of the EEPROM addresses used by Ariadne but I think it ends up causing more problems than just clearly documenting the address range used by Ariadne and letting the user deal with it however they like. |
From @elik745i on March 25, 2017 12:51 Big thanks for help, but that is just an example of webserver I'm trying to get working before implementing update over the web interface into my opensourse smarthouse project. I've already built it around put and get methods and there are minimum 100 of them in the different places in the 2500 line of code ((((( |
In the NetEEPROM library replace the NewEEPROM.h include with the EEPROM.h and see if that helps, just remember to not write in the first few addresses of the EEPROM, as @per1234 explained a few comments above. |
From @per1234 on March 25, 2017 13:44 The problem is the EEPROM library's global class object name conflicts with the NewEEPROM library's global class object name, causing the error:
when you try to compile @elik745i's code. I think the easiest solution is to: extern NewEEPROMClass EEPROM; to: extern NewEEPROMClass NewEEPROM; Change line 68 of NewEEPROM.cpp from: extern NewEEPROMClass EEPROM; to: extern NewEEPROMClass NewEEPROM; After doing this you would need to use |
From @elik745i on March 25, 2017 14:46 EXCELLENT!!! thanks, it looks like it's working now! I'll try to implement changes into my project now... |
From @elik745i on March 25, 2017 15:53 Cool, it's working! Thanks to everyone and special to per1234 |
From @elik745i on March 24, 2017 15:46
EEPROM.put and get requests does not work with newEEPROM library, can anyone fix it? or suggest the way forward...
Copied from original issue: codebndr#38
The text was updated successfully, but these errors were encountered: