0

I would like to control some physical engines, switches on/off, lights through a self written C API.

I already have a very general overview of how to achieve this:

Use the kernels abstraction, write a driver on it and use this as control. The driver itself has to manage incoming bytes and interpret them (depends on port).

I personally would prefer to use a USB port because I can use my MacBook to develope.

But I know that the protocol is quite complicated. However here are my specific questions:

  1. Which port is good to use (is USB a suitable option?)
  2. Could I simply wire a engine to the USBs power cables and connect the data cables to a power swith or do I require an extra board?
  3. Are there better docs for OS X, BSD or gnu/Linux?

Bodo

4

1 回答 1

1

要控制物理引擎,您必须至少添加一个电源板,您的 USB 端口无法驱动直流电机(可能是 LED)。

计算机上最简单的 I/O 端口是 LPT(并行端口),但这是一个“非常”古老的东西。我同意 USB 端口最方便,但为了方便使用它,我建议您购买一张小卡。

这个USB 板(或任何同类)可以解决问题。

我希望它可以帮助你,

于 2013-05-10T10:14:33.960 回答