arduino modify one location on the card or modify a variable while the program is still kept running

ardunio on board memory manipulation have a arduino mega now what is the best way to do the following, i want to have the program running and then update the array on board the arduino with out reloading the program, so lest say i have an array with 10 numbers and depending on the feed back from the card i am going to change location #4 of the in the 10 mem locations that i have set up how is the best way to do this please from the code running on the pc , would i access the arduino then the mem location and go from there, any ideas in this correct direction would be helpful
sydneyguyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mccarlIT Business Systems Analyst / Software DeveloperCommented:
From what I can gather/assume from your question, are you saying that you want the Arduino to stay connected to the PC and for the PC to be able to communicate while the Arduino is still running and to be able to send data to it to modify the way the Arduino is running, or modify the data in the Arduino memory?

If so, this is not necessarily the easiest thing to do, unfortunately!!!  What you need to do is to get the PC to talk to the Arduino over the "serial port" connection (which happens via the USB connection). Then you will need to create the protocol for what gets sent over the serial port in order to update the memory locations. Here is one of the problems, because there are a huge number of ways you could design this: anywhere from sending plain binary data all the way up to complex things like sending XML or maybe JSON content that describes what you want to do (and everything in between). Once you have done that, you then need to code that into the Arduino, to receive this data, parse it and perform the memory update. Also, you mention "code on the PC" so if you don't want to be physically typing these commands into some serial port monitor program on the PC, you will then need create the code for the PC application to send the right data using the protocol you come up with down the serial port.

Not saying any of the above is impossible, just that there is a lot to it.

If you are still keen, I would start by learning about serial communications, and in particular with the Arduino. Look up some "arduino serial tutorials" on Google and once you have that working, look particularly at "arduino serial input tutorials"

Good luck!

(Note: just a comment about your questions... they are fairly hard to read and understand with the lack of sentence structure. If you can try to state the questions a little clearer it may help in the future.)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sydneyguyAuthor Commented:
thanks for that yes that is exactly what i will be doing,watch this space for more questions,
 have already started reading "programing C for arduino " any other well written books worth going through.
 and i may be loading up eclipse i have been reading abut that and have used it in the past. might be a way to go more reading required.
as for getting my sentence structure more readable, have just re read it, your right, gee i must have been tired when i posted it.
thanks for the heads up.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Arduino

From novice to tech pro — start learning today.