82Views3Replies

Author Options:

How to connect my arduino uno to Internet to connect to MYSQL Answered

Hi - I have arduino uno card which has a light sensor. I would want to transfer the light readings to MySQL database. How do I do it? I can write a sketch that can connect to MySQL and insert the data and upload the same to arduino card. But how will my ardino card connect to MySQL. Can you help me here as I am beginner to these topics?

Regards, Harish

Discussions

0
None
Antzy Carmasaic

3 years ago

Easiest way I see is to make an arduino sketch that sends serial data back to PC over USB. Then write a program in processing, java, C#( or any language that can read data from serial port and can connect to mySQL), which then reads the serial data and enters it into your mySQL database.

0
None
ephtermulo

3 years ago

You need ENC28J60 Ethernet shield to transfer data from Arduino to network and you also need to establish a kind of web server to save data to MYSQL using either WAMP or XAMPP. You must have knowledge about PHP MySQL :)

0
None
caitlinsdad

3 years ago

Look up projects on datalogging. Depending on whether the arduino is used standalone or tethered to a computer, you may need get additional hardware to store the data to an SD card. You then have to choose which way the arduino would communicate with a PC to transfer the data, over the USB line, wireless, bluetooth, etc. or just taking the card over to the PC. You then need a computer program to interface with the arduino over the serial port or read the card to pass that data to your database. Good luck.