运行 Windows 10 的 Raspberry Pi2:无 PWM [英] Raspberry Pi2 running Windows 10: No PWM

查看:53
本文介绍了运行 Windows 10 的 Raspberry Pi2:无 PWM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行 Windows 10 的 Raspberry Pi2.我想使用 PWM(移植一些 netduino 代码)控制伺服.Pi-> 上似乎根本没有 PWM 引脚,可能有 12(GPIO 18)例外.有人可以确认吗?

I have a Raspberry Pi2 running Windows 10. I want to control a servo using PWM (porting some netduino code). There does not appear to be a PWM pin at all on the Pi-> with the possible exception of 12 (GPIO 18). Can someone confirm this?

谢谢

推荐答案

RPi2 (Windows IoT) 目前不支持硬件 PWM 和 ADC.您需要一些额外的电路来按需生成 PWM 或记录 ADC.有一些项目可用于此.

Hardware PWM and ADC are not supported right now on RPi2 (Windows IoT). You need some extra circuitry which can generate PWM or record ADC on demand. There some project works available for that.

如何实现 PWM &RPi2 + Windows IoT 上的 ADC?
RPi2 将通过 I2C/SPI 总线连接到网关设备.网关设备只不过是像 Arduino 这样的微控制器.我们需要对网关进行编程以响应 RPi2.网关设备将充当 I2C/SPI 从设备.每当 RPi2 请求写入特定的 PWM 引脚时,网关会根据需要为该引脚生成 PWM.

How you can achieve PWM & ADC on RPi2 + Windows IoT?
RPi2 will be connected to a gateway device via I2C/SPI Bus. A gateway device is nothing more than a microcontroller like Arduino. We need to program gateway to respond RPi2. Gateway device will act as I2C/SPI slave. Whenever RPi2 requests to write specific PWM pin, Gateway will generate PWM for that pin on demand.

您可能喜欢的内容:
PWM 伺服控制 (RPi2 + Windows IoT):
https://www.hackster.io/AnuragVasanwala/windows-10-iot-core-ultrasonic-distance-mapper-d94d63

PWM 电机速度控制 &检索 ADC(RPi2 + Windows IoT):
https://www.hackster.io/AnuragVasanwala/windows-10-iot-core-hydroflyer-f83190

PWM Motor Speed Control & Retrieve ADC (RPi2 + Windows IoT):
https://www.hackster.io/AnuragVasanwala/windows-10-iot-core-hydroflyer-f83190

这篇关于运行 Windows 10 的 Raspberry Pi2:无 PWM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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