我可以把物品在MySQL数据库中,直接从我的Arduino? [英] Can I put items in a MySQL database directly from my Arduino?

查看:212
本文介绍了我可以把物品在MySQL数据库中,直接从我的Arduino?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是在所有可能将数据从一个Arduino与以太网屏蔽发送到MySQL数据库?

Is it at all possible to send data to a MySQL database from an Arduino with an Ethernet shield?

目前我有数据输出到一个网页,但我想记录该数据的历史 - 我可以直接将数据发送到DATABSE

Currently I have data outputting to a webpage, but I would like to record a history of that data - can I send the data directly to a databse?

另外,我可以用PHP来捕获数据,并将其发送到数据库,无需页面不断开拓,因为我想在一系列的天记录数据。

Alternatively, can I use PHP to capture the data and send it to a database without having a page constantly open, as I would like to record data over a series of days.

推荐答案

当然可以,尽管它可能是tediouis。客户机/服务器协议的细节在这里:的http://开发.mysql.com / DOC /内部/ EN /客户端 - 服务器protocol.html 所以它只是在Arduino的实现它的问题。由于程序存储器的限制,可能一个艰巨的任务,但。

Yes you can, although it might be tediouis. The details of client/server protocol are here: http://dev.mysql.com/doc/internals/en/client-server-protocol.html so it's just a matter of implementing it in Arduino. Given program memory limitations, it might a difficult task though.

另一种选择,公开为web服务具有数据库将方便很多。您可以定义自己的喜好协议,并保留所有MySQL处理到PHP。

The other option, having database exposed as a webservice would be a lot easier. You can define the protocol however you wish, and leave all MySQL handling to PHP.

这篇关于我可以把物品在MySQL数据库中,直接从我的Arduino?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆