C++ 直接访问连线
C++ Direct Access To Wires
我想创建一个 c++ 程序来为 cables.Like 以太网电缆供电 it.How 我会选择一根电线并通过它发送电流吗?
如果有人可以解释如何通过 great.I 也不想使用 library.To 的特定电线发送电流使其更清晰,我希望能够做这样的事情 [视频] https://www.youtube.com/watch?v=H1enhkLZm10.
我想这会回答您的问题:I/O Ports controlled LEDs。
这是网站上关于如何与端口通信的代码片段:
#include <conio.h>
#include <dos.h> // For _out
#define port 0x378 // Port Address
#define data port+0 // Data Port of the parallel cable
void main (void)
{
_out(data, 255); // For all lights on
_out(data, 0); // For all lights off
}
如果您不知道计算机如何与外围设备通信,以及USB(通用串行总线)、串行端口和其他端口等不同端口如何通信和工作。本指南应该可以帮助您入门。Control Physical World Through Computer (Step by Step)
我想创建一个 c++ 程序来为 cables.Like 以太网电缆供电 it.How 我会选择一根电线并通过它发送电流吗? 如果有人可以解释如何通过 great.I 也不想使用 library.To 的特定电线发送电流使其更清晰,我希望能够做这样的事情 [视频] https://www.youtube.com/watch?v=H1enhkLZm10.
我想这会回答您的问题:I/O Ports controlled LEDs。
这是网站上关于如何与端口通信的代码片段:
#include <conio.h>
#include <dos.h> // For _out
#define port 0x378 // Port Address
#define data port+0 // Data Port of the parallel cable
void main (void)
{
_out(data, 255); // For all lights on
_out(data, 0); // For all lights off
}
如果您不知道计算机如何与外围设备通信,以及USB(通用串行总线)、串行端口和其他端口等不同端口如何通信和工作。本指南应该可以帮助您入门。Control Physical World Through Computer (Step by Step)