Save data of temperature and humidity on MySQL with Arduino Uno and Wifly

 by camilo.n1012
Featured
P1010087.JPG
P1010025.JPG
Hello guys, i make this instructable for the people that  liked the electronics and the botanic, with this you have the data about  the temperatura and the humidity of your orchard and register this in a data base MySQL.

For this proyect you need some knowledge of programing in PHP and MySQL, we will make three archive .php, but this I'll explain in the following steps.
 
Remove these adsRemove these ads by Signing Up

Step 1: You need this

P1010030.JPG
P1010004.JPG
P1010010.JPG
P1010013.JPG
P1010018.JPG
P1010019.JPG
P1010022.JPG
For this project, you need:

Arduino UNO or similar board  ($29.95)

http://www.sparkfun.com/products/11021

WiFly Shield ($89.95)
http://www.sparkfun.com/products/9954

Grove - Moisture sensor ($4.99)
http://www.seeedstudio.com/depot/grove-moisture-sensor-p-955.html?cPath=144_147

Six Jumper Wires ($4.50)
http://www.sparkfun.com/products/9387

DS18B20 Temperature Sensor with metal tip ($10.59)
http://www.olimex.cl/product_info.php?cPath=21_138&products_id=872&product__name=Breadborad_jumper_wire_pack

If only  need, One protoboar ($9.58)
http://www.olimex.cl/product_info.php?currency=USD&products_id=170&product__name=Proto_Board_Bread_board


AND....

you need a server WEB, with PHP and database MySQL. I used the NAS of QNAP TS-110, is perfect for this project.


enriquesalas506 says: Apr 25, 2013. 4:29 PM
why did you put: client.print( "GET /agregar.php?"); it is just that I haven't seen any agregar.php file on the example. It is equal to add.php?
bkools says: Dec 3, 2012. 4:38 AM
Dear Turbovix,

Did you find the solution i've the same problem
Turbovix says: Oct 24, 2012. 1:29 PM
Dear, to perform the build I get the following message:


In file included from C:\Arduino\arduino-1.0.1\libraries\WiFly/WiFly.h:4,
from wifly_twosensors.cpp:13:
C:\Arduino\arduino-1.0.1\libraries\WiFly/SpiUart.h:62: error: conflicting return type specified for 'virtual void SpiUartDevice::write(byte)'
C:\Arduino\arduino-1.0.1\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
In file included from C:\Arduino\arduino-1.0.1\libraries\WiFly/WiFly.h:8,
from wifly_twosensors.cpp:13:
C:\Arduino\arduino-1.0.1\libraries\WiFly/Client.h:21: error: conflicting return type specified for 'virtual void Client::write(byte)'
C:\Arduino\arduino-1.0.1\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
C:\Arduino\arduino-1.0.1\libraries\WiFly/Client.h:23: error: conflicting return type specified for 'virtual void Client::write(const uint8_t*, size_t)'
C:\Arduino\arduino-1.0.1\hardware\arduino\cores\arduino/Print.h:50: error: overriding 'virtual size_t Print::write(const uint8_t*, size_t)'
Splight says: Oct 21, 2012. 7:40 PM
Well i found this page looking tutorial on how to MYSQL + PHP, and i found this project!! It looks amazing! Congrats!
Jason Bedard says: Jul 16, 2012. 1:01 PM
Knowing what you know now, would you again purchase the Grove Moisture Sensor or would you build your own?
camilo.n1012 (author) in reply to Jason BedardJul 16, 2012. 5:00 PM
I buy the Grove Moisture Sensor in www.olimex.cl, in Chile. i recommend buy this sensor, because is designed for use in gardens.

This is the link :http://www.olimex.cl/product_info.php?cPath=50_91&products_id=929&product__name=Sensor_de_Humedad_en_Huerta_Grove_Moisture_Sensor
masoudrahimy in reply to camilo.n1012Oct 17, 2012. 12:17 PM
hi
where is this file you called by GET
client.print( "GET /agregar.php?");
none of those file has this name,

and where did you located php files?


thank you
Jason Bedard in reply to camilo.n1012Jul 16, 2012. 5:32 PM
Good to know. Thanks.
professorred says: Aug 23, 2012. 8:07 PM
Awesome. I am wondering what kinds of modifications would be needed to save to an sd card instead of the wifi. The wifly is out of my price range for right now but I have all of the other parts. Thank you.
zmashiah says: Jul 19, 2012. 10:14 PM
Very nice.
See this: http://www.instructables.com/id/Wireless-outdoor-Arduino-weather-station-with-PC-l/ for similar thing, only I am saving to flat file on the PC and communicating to PC over XBee rather than Wifi.
nevenne says: Jul 19, 2012. 1:41 PM
where l can find a sensors
camilo.n1012 (author) in reply to nevenneJul 19, 2012. 7:24 PM
Hi, you can find the sensors in www.olimex.cl, they have shiping world. This are the links:

(Moisture)
http://www.olimex.cl/product_info.php?currency=USD&cPath=50_91&products_id=929&product__name=Sensor_de_Humedad_en_Huerta_Grove_Moisture_Sensor

(DS18B20)
http://www.olimex.cl/product_info.php?currency=USD&cPath=50_91&products_id=846&product__name=Sensor_de_temperatura_DS18B20_con_punta_metalica_%2814mts%29
Helder4u says: Jul 19, 2012. 3:30 PM
Great!
I was just looking for an example of how to start a MySQL Database and Connect to a website ^^

Will study Your application :D
msatorius says: Jul 19, 2012. 6:49 AM
How long does this project run on a single 9v?
camilo.n1012 (author) in reply to msatoriusJul 19, 2012. 8:53 AM
Hi, the project will last a one day and half (i tested with my duracell 9v), but I recommend using a battery of the modem of the ethernet, which has allrrededor of 8 to 11.4 V, you will last much because have it a higher amperage. Good luck
Computothought says: Jul 16, 2012. 4:20 AM
Cool.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!