最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Arduino

运维笔记admin31浏览0评论

Arduino

Arduino

Arduino - 检测运动/运动?(Arduino - detecting motion/movement?)

我需要检测物品的移动方向。 我想知道物品是上升还是下降。

这个平台是否可以使用特定的屏蔽?

我在脑海中想到了超声波传感器,用它来衡量物品距离某一点的距离,并由此表明由于距离的变化会发生什么类型的运动。 我认为这可能很棘手,并希望看看是否有更好的选择。

更新:我更新了问题,更正了方向 - 它不是向前/向后,而是向上/向下。

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.

最满意答案

通常,要了解运动方向,您需要使用陀螺仪测量结果,通常表示为四元数。 要获得距离,您需要整合加速数据。 但请注意,这种方法不是很容忍。 您可以使用6轴mems传感器,它可以测量加速度和转速。 有基于Invensense的IC mpu6050和mpu9250的arduino防护罩。 尝试使用i2cdevlib等库。 也可能有用的实现原生的Invensense固件,它可以移植到ARM和微芯片平台,并且应该很容易将代码移动到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.

发布评论

评论列表(0)

  1. 暂无评论