Pages: [1]   Go Down
Author Topic: Retrieving HTTP GET data which has been sent remotely  (Read 276 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys,

I'm beginner of Arduino programming language and I'm looking for some tips how to resolve my problem.
I'm trying retrieving some data which is sending over by this URL
Code:
http://192.168.1.1?altitude=43.9&azimuth=199.5&maxtime=22:55&maxaltitude=45.5&maxazimuth=179
How to obtain some variables from above URL. eg. altitude or azimuth to get 43.9 or 199.5?
This data is variable not constant, in PHP is easy  smiley-wink but how to write some code for Arduino?
Any help will be appreciated.

Regards,
Piotr
Logged

UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12552
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to obtain the URL string from the HTTP request, extract the part of the string that contains the number, and parse that to get the numeric value.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

We can't see what code you have running on the Arduino. So, we can't tell if you are doing anything to store that data. Without knowing that, we can hardly advise you on how to parse the stored data, can we?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi PaulS,

I have no any sample codes because I'm not familiar with C++ or similar C language smiley-sad
If possible could please help me and write sample code how to parse data from URL to extract information?
Thank you in advance.
Piotr
Logged

East Anglia (UK)
Online Online
Faraday Member
**
Karma: 109
Posts: 4074
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you not got any code running on the Arduino that will at least get the whole URL ?
I presume that you have an Ethernet shield.  Did that come with any example programs or links to them ?
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Pages: [1]   Go Up
Jump to: