Arduino Yun to MySQL on Synology

Dear,

I would like to send sensor data from my Arduino Yun to a MySQL database on my Synology NAS, and maybe later fetch parameters from the database as input for the Yun.

For the moment I'm a bit overwhelmed by the number of options (Temboo, curl, php, python, nodejs...). I started of with studying a bit MySQL and php, got the database running and tested a basic php script.

Issue is I'm not a developer, I am OK to read some coding and where required modify, I'm definitely willing to learn but it is not clear to me where to best invest time in.

So what would help me:

  • a simple script that would allow me to do above
  • some explanation on what direction/coding/understanding to invest in to further fine-tune.

Many thanks,
Stijn

TIMESTAMP & PRIMARY KEY

Shell script and Mysql

Python and Mysql

Php and Mysql

Lua and Mysql

Java - JDBC with MSSQL

Java - JDBC with Mysql

Thanks Sonnyyu!

I understand the first ref is the SQL for creating a table with auto timestamp (good idea!), and the other are different options/shell scripts (python, php, ...) to add entries in a table in MySQL.

But how to integrate this in a sketch? How do I pass the measurements (e.g. pin7) from the ATMega "sketch" side to the Linux side? I must be missing something, sorry, started with an Arduino Uno only 2 months ago, and have the Yun since 1 week.

Stijn

PHP & MySQL for Arduino Process Class

Python & MySQL for Arduino Process Class

You can use thingSpeak to store data and retrieve it. It is a free cloud made for IOT stuff.

Thanks gents,
Your input is much appreciated. Looking forward to try and put this into practice ASAP.
Stijn