Arduino的 - 运动检测/运动? [英] Arduino - detecting motion/movement?

查看:627
本文介绍了Arduino的 - 运动检测/运动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在哪个方向上的项目被移动到检测。我想知道,如果该项目是向上,还是向下。

I need to detect in which direction the item is moving. I want to know if the item is moving up or down.

此可能是与该平台,并通过使用特定的屏蔽

Is this possible with this platform and by using a specific shield?

我在我的脑海超声波传感器,与我会衡量项目多远是从某一个点,这个建议是什么类型的运动是因为距离的变化发生。我想这可能是棘手的,想看看有没有更好的选择。

I had in my mind the ultrasonic sensor, with which I would measure how far the item is from a certain point, and with this suggest what type of movement is happening because of the distance changes. I think this might be tricky, and wanted to see if there are better alternatives.

更新:我更新的问题,纠正方向 - 这不是前进/后退,但向上/向下

UPDATE: I updated the question, corrected directions - it's not forward/backward but up/down.

推荐答案

在一般情况下,要知道的运动方向需要使用陀螺测量结果,通常重新psented作为四元$ P $。为了获得距离你需要集成acceletation数据。但是请注意,这种方法不是很容忍。
您可以使用6轴MEMS传感器,测量加速度和旋转速度。有基于Invensense公司的集成电路mpu6050和mpu9250 Arduino的盾牌。尝试库,比如 i2cdevlib 。实现本地Invensense公司的固件也可能有用,但是它移植到ARM和微芯片平台,并应便于移动codeS到的Arduino平台。
另一个有用的链接 freeImu

In general, to know direction of movement you need use gyro measurements results, usually represented as quaternions. To obtain distance you need integrate acceletation data. But notice that this method is not very tolerate. You may use 6 axis mems sensors, which measure acceleration and rotation speed. There are arduino shields based on Invensense's ICs mpu6050 and mpu9250. Try libraries such as i2cdevlib. Also maybe useful to implement native Invensense's firmware, it is ported to ARM and microchip platforms, and should be easy to move the codes to arduino platform. Another useful link is freeImu.

这篇关于Arduino的 - 运动检测/运动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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