在ubuntu中编程的I / O端口 [英] I/O ports programming in ubuntu

查看:95
本文介绍了在ubuntu中编程的I / O端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi


i想学习如何将我的电脑用作机器人等系统的思想。

或使用迷你电脑有可能运行操作系统的主板似乎是linux。



i搜索了很多但是我没有成功找到好的结果。



可能有人帮我吗?

hi
i want to learn how can i use my computer as a mind of a system like robot or etc.
or use of mini-computer boards that have possiblity to run operating systems seems linux.

i searched a lot for it but i didnt success to find good results.

may anyone helps me?

推荐答案

我认为你正在以错误的方式看问题。当你应该考虑硬件时,你会问软件问题。



Raspberry Pi计算机(通常是linux)有你正在谈论的GPIO,I2C和其他端口。这些通常不适用于标准PC机硬件。我最近在这个世界上做了自己的家。看看Raspberry Pi论坛这里 [ ^ ]。有用的图书馆可以在这里找到[ ^ ]。



PS您在邮件中标记了Ubuntu。 Raspberry Pi是linux,但不是Ubuntu。我认为这不是问题。如果您正在严格搜索Ubuntu解决方案,那么答案可能性有限。
I think you are looking at the problem the wrong way. You are asking software questions when you should be thinking hardware.

The Raspberry Pi computer (generally linux) has the GPIO, I2C and other ports you are talking about. These are not generally available on standard PC machine hardware. I have recently made myself at home in this world. Have a look at the Raspberry Pi forums here[^]. A helpful library can be found here[^].

P.S. You flagged "Ubuntu" in your message. The Raspberry Pi is linux, but not Ubuntu. I assume that is not a problem. If you were strictly searching for an Ubuntu solution, that may have limited availability of answers.


您通常不会直接连接 I / O PC 。而是连接 PC (通过虚拟 COM 超过 USB ,例如)到微控制器 [ ^ ],后者又直接处理 I / O
You usually don''t connect directly I/Os to the PC. Instead you connect the PC (via a virtual COM over USB, for instance) to a microcontroller[^], the latter, in turn, handles directly the I/Os.


你的问题太通用了,无法得到一个好的答案。如果你想在计算机上编程IO,那么它取决于你所指的IO(我注意到你提到了com,usb,网络,蓝牙等)。每种方法都有自己常用的标准和方法。通过网络进行通信可能是最好的起点,因为它是一种广泛使用的方法。



使用套接字通过网络进行通信(TCP / IP可能是一个开始的好地方):

http://www.linuxhowtos.org/C_C++/socket。 htm [ ^ ]

http://gnosis.cx/publish/programming/sockets.html [ ^ ]
Your question is too generic to get a good answer. If you want to program IO on a computer, then it depends what IO you are referring to (I noticed you mentioned com, usb, network, bluetooth, etc). Each method has it''s own standards and methods that are commonly used. Communicating via a network is probably the best place to start since it''s a widely used method.

Use sockets to communicate via a network (TCP/IP is probably a good place to start):
http://www.linuxhowtos.org/C_C++/socket.htm[^]
http://gnosis.cx/publish/programming/sockets.html[^]


这篇关于在ubuntu中编程的I / O端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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