Clarification of using EEPROMStore.

Support forum for MegunoLink
Post Reply
brettman
Posts: 4
Joined: Sun Oct 01, 2017 10:52 pm

Mon Oct 02, 2017 4:12 am

I have been reading the page on the following link:
https://www.megunolink.com/documentatio ... promstore/

I am trying to modify the Blink 2 example so the updated values sent from the interface remain in the Arduino after reset or power off.

I have included the library as recommended, but have not been able to figure out the code to put this into practice. Does anyone have an example of code using this method that I could have a look at and hopefully figure it out?

Thanks.
Brett
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Tue Oct 03, 2017 3:25 am

Hi Brett, I have created an example which uses EEPROMStore based on our original "SetParameters" example. You can see it here

https://github.com/Megunolink/MLP/blob/ ... EEPROM.ino

The blink example currently uses the AddVariable() function which is great but it hides what is going on and makes it hard to call the EEPROM Save() function.

Hope this helps.
Phil
brettman
Posts: 4
Joined: Sun Oct 01, 2017 10:52 pm

Tue Oct 03, 2017 10:07 am

Hi Phil,

I copied and pasted the Arduino program, and was able to upload it to the Arduino. However with the interface panel, I saved and opened the "SetParametersWithEEPROM.mlx" file but found it was lines of code. How to I get that to run on Megunolink?

As far as the explanation of the package cost and conditions, I am more than happy to go ahead with that. I think I just need to do a lot of ground work with learning C. I am definitely in it for the long haul, the occupation that I am in could benefit greatly from setting things up with a microcontroller and interfacing it with something as user friendly as Megunolink. I have to just get my head around it first!

Thanks for your patience Phil,

Brett
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Wed Oct 04, 2017 12:06 am

Hi Brett, hmm by double-clicking the .mlx file it should have opened Megunolink. Do you use MATLAB as well? They annoyingly started using the same extension as us about a year or two ago.

You can open it from inside Megunolink by clicking on the little folder icon (second from left on main toolbar). Navigate to the .mlx file and open it.

As well as working on this software we also do consulting on commercial projects. If you guys ever need a hand we would be happy to help out.

Good luck
Phil
brettman
Posts: 4
Joined: Sun Oct 01, 2017 10:52 pm

Wed Oct 04, 2017 8:15 am

Hi Phil,

I don't have Matlab, so I don't know it wasn't working originally.

With opening the file from Megunolink, I attempted that yesterday, but found that I wasn't able to save the mlx file to a location accessible by Megunolink. What I just did then seemed to work, which was copy the text, save in wordpad as a mlx file, then open that in Megunolink. Happy to say that it works and does exactly what I hoped could be done.

Very good, I will go ahead and buy the program in a week or so. In the meantime, I think I need to get my head down and learn "C".

Thanks again for your help.

Brett
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Thu Oct 05, 2017 1:44 am

Haha sometimes the weirdest solutions seem to work. That shouldn't have been necessary so let us know if you have any troubles in the future.

Good luck on your project
Phil
Post Reply