Asked
— Edited
Objective: Use my Android phone as a GPS, compass and tilt sensor by sending URIs to the ARC HTTP Server by writing a simple Android app the continuously reports URIs to the HTTP Server.
Situation: I have a variable in a EZ-Script control that is continuously running. EZ Script:
:Loop
Print($VarTest)
Goto(Loop)
I would like to set this variable($VarTest) value externally using the HTTP server control and have it value change reflected in the EZ-Script control that is running in a continuous loop in ARC.
So I execute this URL: http://192.168.1.67/Exec?password=test&script=$VarTest=1
This is returned: Syntax Error: Unknown command: $VarTest
Question: Is this possible? How is it done? Slightly off topic, are all user defined variables in ARC global in scope?
That's a neat idea
HTTP URL has a few reserved characters. The = sign is one of them. Use the Url Encoding feature in your host development environment. Your URL would look like...
Variables are global scope. You can tell by adding the "Variable Watcher". You can see the values of all variables. Also the forum Search will help you
This URL encoder may help you in the future: http://meyerweb.com/eric/tools/dencoder/
It's online. It'll help you to see what characters will need to be encoded in your string.
Seesh, I'm slapping myself. I done query strings so much in the past you'd think I would have caught the double equal sign on the last parameter. I think I was just momentary stunned by the power of ARC... eek
What I was day dreaming up the other day... You know aside from all those things guys normally think about.
Was cheap neatbook running ARC Andriod phone acting as wifi hotspot Netbook connected to the phone's wifi hotspot
Andriod phone reporting back to ARC its sensor data. Via what seems like the simplest method using query string script commands.
Minus the kid, plus a twelve volt battery. Use a dremal to remove unwanted plastic. Add the h-Bridge and steering gear. BLAM! You've got a robot that can carry sixty pounds of gear and can go almost anywhere it can get cell reception. Best of all the dang thing's piloted by Buzz Light Year.
Okay, I know... the devil's in the engineering. Just a thought tho...
What's wrong with leaving the kid on there?
Also, even though it breaks the rules... I added support in the next release to read any character
Would you be willing to share the android app? I think your idea is a great one.
Alan
i am using a android phone as hotspot on my rc robot,i like your idea about the GPS, compass and tilt sensor