Pages: [1]   Go Down
Author Topic: lcd menu save to eeprom  (Read 735 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 142
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
So I have a large menu with a lot of options, it currently works nicely. What I want to do however is store the user's "favourites" in eeprom and the have a menu option that displays the entries from the eeprom if any are stored. My question is, I dont want to just display the favourites as "001, 002, 003..." on the menu I want to display the same menu string - i.e "item 1" or whatever the string when it is displayed through the menu is. In other words I need to save the settings to the eeprom and relate those settings to a string so the user knows what they are choosing from the menu.
I am thinking about a struct after reading about them - but not completely sure. Can I use this to relate a String to an integer value, so I display the string but when it is chosen the integer value is what is used?
In Java, i know you can "map" a string to a value, but map is obviously used for something else in Arduino land...
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 642
Posts: 50397
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The "favorites" text obviously comes from your existing menu. The "favorites" item, then, would be a series of values that got them to their "favorite", wouldn't it?

By using that same set of values, you could present the same menu(s) in the same order, right?

So, I guess I'm failing to understand the difficulty you are seeing.
Logged

Pages: [1]   Go Up
Jump to: