Best way to manage 35 variables?
Posted: Fri Dec 03, 2010 11:54 pm
I have been sorting out how to manage around 35-40 variables between a wifi device and end users over the internet. To do this I set up a MYSQL db on my website, and have some test code in php that will update and get from the db based on what is coming in from the POST commands.
Currently I am using for testing something like this from the microprocessor device that talks to wifi via UART:
POST$/dbaccess.php?
Then the processor sends out whatever it wants to send based on what needs to happen. Below it just sends out a lot of test vars and data:
The php at the site does some updating to several locations on the database, and echos all the variables back to the wifi device just so I can monitor that it is getting it in tact.
The plan is to have the sifi device updating the db as anything changes on it, and the end user can monitor the values and understand what is going on, plus the the user can update the variables, and the wifi can get the changes and store them.
Is using the example above of sending all ( or in some cases just some) variables using a scheme like a-z considered practical or is there a better way to do it? I need to keep things ultra simple for now since I am just starting.
Currently I am using for testing something like this from the microprocessor device that talks to wifi via UART:
POST$/dbaccess.php?
Then the processor sends out whatever it wants to send based on what needs to happen. Below it just sends out a lot of test vars and data:
Code: Select all
ser.str(2, string("A=1&B=2&C=3&D=-2500555123&E=5&F=6&G=7&H=8&I=9&J=10&K=11&L=12&M=13&N=14&O=15&P=16&Q=17&R=18&S=19&T=20&U=21&V=22&W=23&X=24&Y=25&Z=26")) The plan is to have the sifi device updating the db as anything changes on it, and the end user can monitor the values and understand what is going on, plus the the user can update the variables, and the wifi can get the changes and store them.
Is using the example above of sending all ( or in some cases just some) variables using a scheme like a-z considered practical or is there a better way to do it? I need to keep things ultra simple for now since I am just starting.