Pages: [1]   Go Down
Author Topic: Sending data from arduino+ethernet/wifi shield to a sql server (MS) on the web  (Read 5676 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, this is my first post in Arduino's forum, I find this community great and helpful.

My new project is to use Arduino to:

*sensor my room temperature and store data in a sd card
*with the use of a wifi/Ethernet shield, send every 2min the data stored in my sd card to a SQL Server (MS)
*I've created a website that will retrieve data from the sql server and display all the data in browser, so that when I'm away from home I can monitor my home temp.

I've read many solutions, but in most cases i need a pc that acts like a bridge between the arduino and the sql server.
Furthermore I'm using MS azure as sql server and clearly coding the arduino with ado.net is impossible and it's not an elegant solution.

I've also considered using Netduino but I want to stick to Arduino
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1925
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I don't know how to code all this myself, but it can be done using existing online sites..  Basically they use HTTP PUT and GET or UDP PAckets so that you don't have to mess with opening router ports etc.

KSduino.org is one example.. Here's my live house data: http://ksduino.org/?devices&device_id=3330

Example Arduino code is here: http://arduino-info.wikispaces.com/ksduino-tests1 

I plan to make that into a much better how-to page on the http://ArduinoInfo.Info WIKI

Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

New Jersey
Online Online
Faraday Member
**
Karma: 67
Posts: 3702
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How much help do you want? By which I mean is this a learning experience or are you looking to get it working quickly by adapting existing code? If it's the latter, you might find this interesting: http://arduino.cc/forum/index.php/topic,69165.0.html
Logged

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

Mostly it’s learning experience, but the goal is to build basic domotic devices for my house and eventually, if everything is good, sell them, for this reason the system needs to be robust.

According to the greenhouse project and from what I seem to understand, he is using wiserver.h library for the wifi shield to communicate via PHP to the Mysql server?

This implies that I can’t send data to a sql server but only to a mysql using php?

thanks
« Last Edit: February 01, 2013, 09:56:47 am by luther » Logged

New Jersey
Online Online
Faraday Member
**
Karma: 67
Posts: 3702
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, your PHP server can use whatever database suits you. The only reason I used MySQL was because I already had a web server (LAMP) set up with it ready to go. You can use the same GET method to send the data to the PHP driven site, what it does with that data is up to you.
Logged

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

thanks for your help, I'll give it a try using PHP, since I'm used to ASP.net I hope to get some results in short term.
Logged

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

Hi!

There's no need to use PHP for this, you can write this in ASP.NET as well.
Your Arduino just has to call a website like http://www.mydomain.tlc/index.aspx?temp=[SensorOutput]
This website reads out the parameter "temp" and writes it to the database.

Bye
Stefan
Logged

Offline Offline
Full Member
***
Karma: 5
Posts: 181
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want a solution that doesn't need an external PC you may want to consider using a Raspberry PI to host the webserver.
http://www.penguintutor.com/linux/raspberrypi-webserver
Logged

Pages: [1]   Go Up
Jump to: