0

So I'm doing a project that involves getting sensor data from several sensors, and then sending them to an external server when a tragic occurs. But I've been having trouble figuring out how to send this data, and I am welcome to advice (I'm still relatively new to Arduino coding).

I'm using an Arduino mega, with a sim900 GSM shield and an SD card. The sensors are just analog reads and a GPS.

I've looked into FTP, a Xively account and http requests to a web server but couldn't figure it out.

  • Do you have internet service in that GSM shield? – fabrosell Mar 30 '16 at 21:21
  • Yup. The shield has a SIM card with 3G – Generalno1 Mar 31 '16 at 2:15
  • You should check for: "Sim900 HTTP POST" on Google. There also should be a lot of libraries for this. You'll have to set up a webserver that accepts HTTP post messages. But you might try using a post dump test server first (posttestserver.com) this worked great for me in the past. But I had an PIC microcontroller. – Paul Mar 31 '16 at 9:12
1

There is a good example of using the SubmitHttpRequest() in this article: GPRS Shield SIM900 Arduino

You could easily modify: mySerial.println("AT+HTTPPARA=\"URL\",\"www.yourwebsite.com/testing.php\"");

to include a string of the sensor value, and then using a PHP script to MySQL on your webserver. Maybe something like: http://yourwebsite.com/testing.php?sensor1=5&sensor2=10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.