New Query Script

I’ve been working on a PHP script for the mbari.org data. Here is the link if anyone would like to see where the data is coming from. The data is from the beginning of 2013 to today’s current date. I have tried the other querying sites but mbari was the easiest because of the API while the other sites were really confusing on how to find certain data that I wanted.

I believe Gene said that he has his own server so if I can implement the PHP script to his server and if we’re able to connect it to the arduino, I hope it works out fine! So far, I just made a server on my laptop using xampp and localhost to test it out and it seems to be working fine. Also it is refreshing the page and updating the output text file every 30 minutes so we will be able to get the live data coming in.

Here is an example output I made to test all the data have been split so it’ll be easily accessible when we want a certain type of data to update:

0 = date&time; 1 = not important; 2 = nitrate; 3 = salinity; 4 = pH

Array
(
    [0] => 
01/01/2013 00:29
    [1] => 41275.02017
    [2] => 73.4
    [3] => 30.1807
    [4] => 8.056
)
Array
(
    [0] => 
01/01/2013 01:29
    [1] => 41275.06184
    [2] => 76.39
    [3] => 29.7502
    [4] => 8.076
)
Array
(
    [0] => 
01/01/2013 02:29
    [1] => 41275.10351
    [2] => 78.8
    [3] => 29.3885
    [4] => 8.082

This is only the output on the server. The text file looks like

01/01/2013 00:29,  41275.02017,  73.4,  30.1807,  8.056

01/01/2013 01:29,  41275.06184,  76.39,  29.7502,  8.076

01/01/2013 02:29,  41275.10351,  78.8,  29.3885,  8.082

However, after 1/18/2013, all the pH shows as 1.79E+308. Which I don’t understand why and I could not find any other data sites that shows pH that I can easily query. But I will keep looking tonight.

Array
(
    [0] => 
04/30/2013 15:30
    [1] => 41394.64625
    [2] => 20.25
    [3] => 34.1384
    [4] => 1.79E+308
)


		
	

Leave a Reply

Your email address will not be published. Required fields are marked *

rfwbs-sliderfwbs-sliderfwbs-sliderfwbs-slide
%d bloggers like this: