将传感器数据写入数据库 [英] Writing sensor data to a database

查看:1174
本文介绍了将传感器数据写入数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我的问题不是很好,或者含糊不清,那么对这些东西很新,请致歉



我有一个温度传感器,但我被要求确保传感器读取的读数被写入数据库。如何在数据库和传感器之间建立连接?



谢谢



什么我试过了:



从谷歌搜索或传感器手册中找不到多少

Kinda new to this stuff so apologies if my questions is not very good, or vague

I have a temperature sensor but I have been asked to make sure that readings taken by the sensor are written to a database. How do I make that connection between the database and the sensor?

Thanks

What I have tried:

Not much found from a google search, or on manuals for sensor

推荐答案

写入数据库很容易,你可以使用sql INSERT 语句: SQL INSERT INTO语句 [ ^ ]



困难的部分是:

1)你正在使用什么样的数据库,(sqlite,sql server, mysql,非关系...)?

2)您使用的编程语言是什么?

3)什么是温度传感器硬件?

4)如何连接传感器硬件?

5)代码是否可以在硬件上运行?

...



所有你没有说明的,他你的问题是不负责任的。



尝试询问谁告诉你做项目的问题。
Writing to the database is the easy part, you do it with a sql INSERT statement : SQL INSERT INTO Statement[^]

The hard parts are :
1) What kind of database you are using, (sqlite, sql server, mysql, non relational ...) ?
2) What programming language you are using?
3) What is the temp sensor hardware?
4) How you connect to the sensor hardware?
5) Is the code going to run on the hardware or not?
...

All of which you have not specified, hence your question is not answerable.

Try asking the question from who ever told you to do the project.


这篇关于将传感器数据写入数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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