Sending Variables!


hi, first post , i'm spanish, sorry english!

- send "webduino" url this:  http://192.168.1.150/web/intread?i=contador
- arduino request value of int.
- use part of program , works correctly.

int contador
int estado
...

(value char, , word after "=", on case contador)

            if (strcmp(value,"contador") == 0)
            {
            int val = contador;
            server.print(val);
            }
            else if (strcmp(value,"estado") == 0)
            {
            int val = estado;
            server.print(val);
            }

...

the program returns via web integer (value of "contador")

now want compare the  value , name of public variable. if same, send value of integer variable.

any idea? lot of thanks, pexu!

quote
now want compare the  value , name of public variable.

perhaps if looked @ contents of hex file uploaded arduino, you'd see impossible task.

variable names mapped addresses in hex file. name not part of uploaded hex file, there no way compare string (non-existent) variable name(s) @ run time.

in code have now, doing comparison @ compile time, not @ run time.


Arduino Forum > Using Arduino > Programming Questions > Sending Variables!


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial