I need to cater 400 user tags, i need store only the balance and user name of the specific card, admin will be the one who responsible to add balance of the user card.
Well you aren't going to be able to store that many in the onboard EEPROM. Assuming you have an Uno then you have only 1024 bytes.
You should consider other options for storing the information like an external FRAM chip.
I'm not sure you can do that anyway in eeprom?
Why not ?
EEPROM stores bytes but it is up to you what those bytes represent
Oh yes, I forgot that. I alwasy just think of it as for numbers ;). But there's not much of it.
I wonder if an SD car would work? But I personally have no experience with retrieval of a specific record (name, balance whatever) from one. I suppose even if it's inefficient, one could scan the SD card file from the top until reaching the right one?- with only 400 maybe that's not too big an issue.
Given a user's number and with the data stored in a struct it would be easy to derive the EEPROM position in which the user data was stored and then to retrieve it
Whether EEPROM is an appropriate medium to store the data is another matter
You also need to consider some form of security. If a user can change their "user number" stored on the card then they can pretend to be someone else and use the other person's funds to make a purchase.
It would be interesting to see the actual problem statement as given to the class. In real life you're 100% right, but perhaps not necessary if this is a purely academic exercise.. bonus points maybe! Or using an Agile approach, incremental improvements? Otoh, even if it is academic maybe the school wants to implement it for real, in which case all the real world concerns need to be considered.
Agreed... although anything with money involved (prepaid card), I'd be thinking about security fairly early in the design.
Something else to consider @mwanyamaki96 is does the admin need to be able to be able to add and delete users, or do you plan to hard-code those into the Arduino program? That's doable of course, but not very "real world".
sorry for the late reply, admin will be able to add only balance for the specific user card, other tasks will be hard-coded into the arduino program sir.
What are the tags?
Tom....
what do you mean?
that's the great answer for the people like him
I actually think he's a good dude... he was asking a genuine question.
alright sir
I mean 400 RFID cards
No screen to see what the admin is doing?
So a user is identified by a name (say 20 bytes) and has a cardID (12 bytes ?) and a balance (2 or 4 bytes?). You need 36 bytes per user x 400 users = 14 400 bytes ➜ you need to decide where in memory you will archive that knowing that the balance needs to be modified. That should influence which arduino or extra components you need for the project
i think arduino mega will be fine sir