将GPIO用于带C#的旋转编码器 [英] Using GPIO for Rotary Encoder with C#

查看:301
本文介绍了将GPIO用于带C#的旋转编码器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在尝试开发一种用C#编写的旋转编码器控制器。典型的旋转编码器有顺时针和逆时针方向的针脚A和针脚B.

I'm trying to develop a rotary encoder controller written in C#. Typical rotary encoder will have a Pin A and Pin B for clockwise and anti clockwise direction.

似乎没有库。

我不确定如何利用/使用新的Creators Update GpioChangeCount或GpioChangeReader,或者如果在GPIO上生成事件更改是编码此代码的最佳方式。

I'm not sure how to take advantage / use the new Creators Update GpioChangeCount, or GpioChangeReader, or if event's generated on GPIO change is the best way to code this.

有人有任何可重复使用的代码/帮助吗?

Does anybody have any reusable code/help?

谢谢!




推荐答案

Hello Matthew,

Hello Matthew,

您可以使用GpioChangeReader创建自己的实现。

You can create your own implementation using GpioChangeReader.

或者您可以使用
Arduino用于Windows IoT核心的连线
如果有这样的库,可以使用现有的arduino库。

Or you can utilize Arduino Wiring for Windows IoT Core to use existing arduino library if there is such library for you.

祝你好运,

Rita


这篇关于将GPIO用于带C#的旋转编码器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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