arduino温度控制器_适用于FPS的最佳控制器-使用Arduino和OrbShield与Windows 7配合使用的SpaceTec SpaceOrb 360控制器...

arduino温度控制器

arduino温度控制器

spaceorb

Let me tell you a story, Dear Reader.

亲爱的读者,让我告诉你一个故事。

15 years later and I'm still convinced that the SpaceOrb 360 is THE GREATEST GAME CONTROLER OF ALL TIME. See what I did with the all cap there? It's the G.O.A.T. and it's a tragedy that it lost the battle to "WASD" keyboard and mouse gaming and the "two thumbs" style of controller.

15年后,我仍然坚信SpaceOrb 360是有史以来最伟大的游戏控制器。 看到我在那边的全部上限了吗? 这是山羊,这是一场悲剧,它输给了“ WASD ”键盘和鼠标游戏以及“两指”风格的控制器

If you've ever tried a SpaceOrb, you probably already know this. If you didn't live through the SpaceOrb's hayday (around 1994-5 with the original Quake, and Descent, truly one of the greatest games ever) then this post will sound like I'm a crotchety old dude trying desperately to relive my the golden hour of my youth. Ok, so you got me. What of it? ;)

如果您曾经尝试过SpaceOrb,那么您可能已经知道了。 如果您没有经历过SpaceOrb的忙碌生活(在1994-5年前的原始Quake和Descent中,这确实是有史以来最伟大的游戏之一),那么这篇帖子听起来就像我是一个老套老兄,拼命地尝试重温我的我青春的黄金时刻。 好的,所以你懂了。 怎么了;)

I've always loved this controller and I've kept mine in my pile of technocrap, even after I held my legendary "box of technocrap auction" in 2007. I couldn't let it go. Much like a beloved, but passed-on pet that an owner keeps frozen hoping that far-future technology will help them unfreeze and cure (too much? Ya, I thought so too) I've kept my SpaceOrb frozen in Amber waiting for a day, decades hence, when I might bring it back to life and back to its former glory.

我一直很喜欢这个控制器,即使在2007年举行了传奇的“ technocrap拍卖箱”之后,我仍然把自己放在我的Technocrap。 我不能放手就像主人爱的但被遗弃的宠物一样,主人一直冻着,希望未来的技术能够帮助他们解冻和治愈(太多了?是的,我也这么认为),我将SpaceOrb冻在琥珀中等待着一天,几十年后的今天,我可能会重振生命,重拾昔日的辉煌。

I hooked it up several times over the last few years and made various attempts to decode the serial output, first without the spec, then later with a leaked? copy of the serial spec. Ultimately my lack of deep knowledge of driver code was my undoing.

在过去的几年中,我多次将其连接起来,并进行了各种尝试来对串行输出进行解码,首先是没有规范,然后才出现泄漏? 串行规范的副本。 最终,我对驱动程序代码缺乏深入的了解导致了我的消亡。

Here's the END of the story, as a Video.

这是视频的故事结尾。

And here's the beginning. Llast week, in a random moment of Googlebinging, I found this site with the title: The ultimate orb solution, at last. 

这是开始。 上周,在Googlebinging的随机时刻,我终于找到了这个网站,标题为:终极球解决方案。

Oh, my. It was hardcore, insane, and deeply awesome. Here's the scoop.

天啊。 这是顽固,疯狂和令人敬畏的。 这是独家新闻。

SpaceOrb 360 (SpaceOrb 360)

SpaceOrb 6 Axis

It's brilliant in it's simplicity. It's a rubber ball on a stalk that you can push or turn in any direction. It's 6 complete axes of motion. Think about all the trouble newbies have learning how to move a person around a First Person Shooter (FPS) with a mouse and keyboard or with a two-stick controller. It takes a while, and for many new folks (your spouse, your mom) they just give it up and think you're nuts.

简单就很棒。 它是茎上的橡胶球,您可以任何方向推动转动。 它是6个完整的运动轴。 想一想新手要学习的所有麻烦,他们将学习如何使用鼠标和键盘或两杆式控制器在第一人称射击游戏(FPS)周围移动人。 这需要一段时间,对于许多新人(您的配偶,您的妈妈),他们只是放弃了,认为您很疯狂。

Now, with the SpaceOrb, imagine the ball is your head. You just turn it to look left. Push it forward to move forward. Even new users can look down left, turn and strafe all at the same time because they just turn, push and twist the ball.

现在,有了SpaceOrb,想象球就在你的头上。 您只需将其向左看。 向前推动以向前移动。 甚至新用户也可以同时向左看,转弯和扫射因为他们只是转弯,推动和扭转球。

The SpaceOrb 360 is truly the Betamax of controllers. Technically superior in every way, but just didn't happen.

SpaceOrb 360确实是控制器的Betamax 。 从技术上讲,它在各个方面都比较出色,但没有实现。

狂热的粉丝和真棒的死亡 (The Hardcore Fans and the Death of Awesome)

As a controller, there are advanced versions that are you used for 3D modeling, but as  game controller it just never happened. (Damn you, WASD!) However, a website called Birdman's Lair kept the hacks and tweaks and tricks alive for a decade. You could find joystick.cfg files for Counter Strike and all sorts of hacks, partial drivers and general trouble. None of it ever rocked and none of it was a perfect solution.

作为控制器,有一些用于3D建模的高级版本,但作为游戏控制器,它从来没有发生过。 (该死的,WASD!)但是,一个名为Birdman's Lair的网站使黑客,调整和欺骗手段存活了十年。 您可以找到“反恐精英”的joystick.cfg文件以及各种黑客,部分驱动程序和一般性问题。 没有哪一个是动摇的,也不是完美的解决方案。

Fast forward a few years and USB happened. More and more computers had USB and fewer and fewer had serial ports. You see, the SpaceOrb is 9-pin RS-232. It's a serial device. A few Serial to USB adapters were attempted, but those adapters just make virtual serial ports. As Windows 95 and XP gained prominence, fewer games even looked for serial points. DirectX (DirectInput, actually) was the final nail in the SpaceOrb coffin.

快进几年了,USB发生了。 越来越多的计算机具有USB,而越来越少的具有串行端口。 您会看到,SpaceOrb是9针RS-232。 这是一个串行设备。 尝试了一些串行到USB适配器,但是这些适配器仅构成虚拟串行端口。 随着Windows 95和XP的兴起,甚至连序列号也越来越少的游戏。 DirectX(实际上是DirectInput)是SpaceOrb棺材的最后钉子。

VPutz,CountryAtHeart和JayCrowe (VPutz, CountryAtHeart and JayCrowe)

Way over here in the Deep Web (well, not that deep, but obscure, surely) Vic Putz made a post in January of 2009. He'd previously written a HID (Hardware Input Device) driver called hidsporb. He never liked that driver. Here's his own words:

路在这里深网(很好,其实并不深,但掩盖,肯定)维克朴子在2009年1月份后。 他以前曾编写过一个名为hidsporb的HID(硬件输入设备)驱动程序。 他从不喜欢那个司机。 这是他自己的话:

You see, I really was never satisfied with hidsporb as a Windows HID driver for a number of reasons. The enumeration of serial ports took time, and as legacy serial ports dropped from modern motherboards it became trickier and trickier to use. But it's punishing working on Windows drivers, and Vista is even moreso, since I hear it doesn't even allow unsigned hobby drivers.

您会发现,出于多种原因,我真的不满意hidsporb作为Windows HID驱动程序。 串行端口的计数很费时间,而且随着旧式串行端口从现代主板上掉下来,使用起来变得越来越棘手。 但是在Windows驱动程序上工作很麻烦,Vista更是如此,因为我听说它甚至不允许未经签名的业余驱动程序。

Windows surely isn't exactly a playground for hobbyists who write device drivers. As a guy who runs Windows 7 x64, I can tell you this is true. Plus, as he points out, who has a serial port any  way?

对于那些编写设备驱动程序的爱好者来说,Windows肯定不是一个游乐场。 作为运行Windows 7 x64的人,我可以告诉你这是真的。 另外,正如他指出的那样,谁拥有串行端口?

He posted this. I must also say +1 Charisma for the Alka Seltzer container.

他张贴了这个。 我还必须说Alka Seltzer容器的+1魅力。

Sorry to be so dramatic, but I've dreamed of this for a long time and finally had the convergence of resources, time, and irritation to do it. You want a driver? I got your driver RIGHT HERE:

抱歉,这么戏剧性,但我梦this以求了很久,终于做到了资源,时间和精力的集中。 你要司机吗? 我在这里找到了您的司机:

While he prototypes the thing extremely quickly (he's apparently obsessed, and obsession makes good design, I always say) over the next few months Vic and friends revise and experiment with this beast. They swap PDFs of board layouts, parts and code. Folks create their own boards and eventually Vic gets Seeed Depot to offer an OrbSheild for $25. It's a kit that makes the board that is needed for this project.

接下来的几个月中,尽管Vic和他的朋友们非常快速地制作了东西的原型(他很痴迷,并且痴迷于良好的设计,我总是说),但Vic和他的朋友修改并尝试了这只野兽。 他们交换电路板布局,零件和代码的PDF。 人们创建自己的木板,最终Vic获得Seeed Depot以25美元的价格提供OrbSheild 。 这是制作该项目所需板的工具包。

Let me back up.

让我备份。

解决方案 (The Solution)

What Vic has done is effectively created a device driver in hardware. Remember earlier all that stuff about how COM Ports went away and USB ports came into ubiquity? Well, an important point is that the concepts of the standard USB keyboard and mouse and "HID" (Hardware Input Device) in Windows also happened. You plug a keyboard, mouse, or device that is effectively both into your Windows machine and it just works!

Vic所做的工作实际上是在硬件中创建设备驱动程序。 还记得以前有关COM端口如何消失以及USB端口无处不在的所有内容吗? 好吧,重要的一点是Windows中的标准USB键盘和鼠标以及“ HID”(硬件输入设备)的概念也发生了。 您将有效地同时插入Windows机器的键盘,鼠标或设备插入即可使用!

What Vic's done here is created USB Hardware Input Device that is recognized by Windows with no 3rd part drivers needed. This device can be a keyboard and mouse (or a joystick). Rather than creating game specific and often very complex mapping files to get your games to work with exotic hardware like the SpaceOrb, you make your changes as little Arduino programs and upload them directly the adapter.  It's a bridge between an old serial port device and the USB standard HID stuff.

Vic所做的是创建了USB硬件输入设备,该设备可以被Windows识别,而无需第三部分驱动程序。 该设备可以是键盘和鼠标(或操纵杆)。 无需创建特定于游戏且通常非常复杂的映射文件来使您的游戏与诸如SpaceOrb之类的奇异硬件一起工作,您只需做一些Arduino程序就可以进行更改,然后直接将其上传到适配器。 它是旧的串行端口设备和USB标准HID设备之间的桥梁。

The main Arduino board is doing the work of translating the serial input through Vic's code into standard USB joystick motions, or standard mouse and keyboard actions. Magical. More on this later.

Arduino的主要板正在完成通过Vic代码将串行输入转换为标准USB游戏杆动作或标准鼠标和键盘动作的工作。 神奇。 稍后对此进行更多讨论。

构建OrbShield硬件 (Building The OrbShield Hardware)

It's so easy to make a 4 year old could do it. Ok, he couldn't, but he did stick around while daddy did the soldering. I ordered an OrbShield 1.0 Kit and an Arduino Duemilanove with ATMega328 (I didn't use Netduino because all the code for this project is in Arduino C, if you're curious).

让4岁的孩子可以做到这一点很容易。 好的,他不能,但他确实坚持了,而爸爸却在焊接。 我订购了带ATMega328OrbShield 1.0套件Arduino Duemilanove (我不使用Netduino,因为该项目的所有代码都在Arduino C中,如果您很好奇的话)。

I received the package a week later looking like this. The Arduino board is on the left and fully assembled. The daughter-board or "shield" is all the other parts. Vic has an extremely helpful tutorial on how to build an OrbShield up on SourceForge, and honestly, if he hadn't taken all the photos and done such a great job, I'd probably not have succeeded.

一周后我收到了这样的包裹。 Arduino板在左侧,并且完全组装好。 子板或“防护板”是所有其他部分。 Vic有一个非常有用的教程,关于如何在SourceForge上构建OrbShield ,老实说,如果他没有拍完所有照片并做得如此出色,我可能不会成功。

After relearning how to solder, I ended up with this sad backside of the board. Hey, first time in years, so I say I did OK. ;)

在重新学习了如何焊接之后,我最终遇到了电路板的这个悲伤的背面。 嘿,多年来第一次,所以我说还可以。 ;)

I snapped them together (plus an added piece of cardboard to keep my too-long resistors from shorting out against the top of the Arduino's USB ports) and took over to the PC.

我将它们卡在一起(加上一块硬纸板,以防止过长的电阻器与Arduino USB端口的顶部短路),然后接管PC。

构建和下载OrbShield Arduino软件 (Building and Downloading the OrbShield Arduino Software)

This was the only part that was a little confusing, as the tutorial assumes a little more knowledge of where stuff goes with the Arduino than I had, which was zero.

这是唯一有点令人困惑的部分,因为本教程假定与Arduino有关的内容要比我多得多,为零。

Here's the process:

过程如下:

Run the Arduino software, set your COM Ports and Chip Type.

运行Arduino软件,设置您的COM端口和芯片类型。

There's two "sketches" that you'll care about. BasicJoystick and WASD. BasicJoystick makes the SpaceOrb look like a Joystick. WASD does the hard work of mapping your SpaceOrb to the WASD keys plus a mouse.

您将关注两个“草图”。 BasicJoystick和WASD。 BasicJoystick使SpaceOrb看起来像操纵杆。 WASD很难完成将您的SpaceOrb映射到WASD键鼠标的工作。

Here's the software. You'll click Upload after you make any changes you might want to. Yes, it's "C" Code, but don't be afraid, think of it as a configuration file for your SpaceOrb.

这是软件。 进行所有更改后,您将单击上载。 是的,它是“ C”代码,但请不要害怕,将其视为您的SpaceOrb的配置文件。

There are two USB connectors on the final hardware solution, one to talk to the Arduino for uploading code, and the one as part of the daughterboard that does the actual communicating with the SpaceOrb.

最终的硬件解决方案上有两个USB连接器,一个用于与Arduino交流以上传代码,一个作为子板的一部分,用于与SpaceOrb进行实际通信。

The process is this:

过程是这样的:

  • Set both the DIP switches to off.

    将两个DIP开关都设置为OFF。
  • Plug the Arduino's USB into your computer.

    将Arduino的USB插入计算机。
  • Upload code.

    上传代码。
  • Unplug the Arduino's USB.

    拔下Arduino的USB。
  • Set the #1 DIP to on.

    将#1 DIP设置为开。
  • Plug the OrbShield's USB (the daughterboard) into your computer.

    将OrbShield的USB(子板)插入计算机。
  • Repeat if you want to make changes or switch modes.

    如果要进行更改或切换模式,请重复。

Here's the Arduino environment:

这是Arduino环境:

Here's the code for Basic Joystick, as an example:

这是基本游戏杆的代码,例如:

#include "orb_device.h"
#include "orb_translator.h"
#include "hid_keys.h"
#include "chart_4.h"

//change value below to SpaceOrb360, SpaceBall4000, or SpaceBall5000
Logical_orb orb_buffer( SpaceOrb360 );
Orb_translator translator;

void setup()
{
Serial.begin( 9600 );

translator.default_setup(orb_buffer.orb_type);
}

void loop()
{
orbduino_checkinit( orb_buffer, translator, orb_device );
orbduino_translate( orb_buffer, translator, orb_device );
}

Not too hard! He's hidden all the hard stuff and you just call his functions. I didn't make ANY changes to Basic Joystick to get it too work, and only minimal ones to make "WASD" work nicely.

不是太难! 他隐藏了所有艰苦的工作,您只需调用他的功能即可。 我没有对Basic Joystick进行任何更改,也无法使其正常工作,只有极少的更改可使“ WASD”正常工作。

Here's the SpaceOrb as viewed from Windows 7 x64:

这是从Windows 7 x64观看的SpaceOrb:

Game Controllers

And the Test Page. He uses "chording" which means all 16 buttons work if you press different combinations of buttons.

和测试页。 他使用“和弦”,这意味着如果您按不同的按钮组合,则所有16个按钮都将起作用。

SpaceorbSpaceball properties

This is the joystick, config, but I ended up using the WASD+Mouse configuration as it "just works" in most games, including my test game, Half-Life 2. When you're using the WASD configuration, you can literally use the SpaceOrb as just another mouse. Watch in my video above at the end where I actually move windows around the screen with only the SpaceOrb.

这是游戏杆的配置,但是我最终还是使用WASD + Mouse配置,因为它在大多数游戏中都“起作用”,包括我的测试游戏Half-Life2。当您使用WASD配置时,您可以使用字面上的含义SpaceOrb就像另一只鼠标一样。 最后,在上面的视频中观看,实际上我仅使用SpaceOrb在窗口中移动窗口。

It was SUCH a rush to get this working. Even though all I did was effectively assemble all this from a kit and great instructions, the feeling of accomplishment in bringing this dead (I thought) piece of hardware back to life was SO satisfying. This experience has made me want to dig back into electrical engineering, a topic I glossed over in college, so that I might better understand how these solutions are conceived and created.

赶紧让它工作。 即使我所做的只是从套件和出色的说明中有效地组装了所有这些组件,但使死去的(我认为)硬件重获新生的成就感还是令人非常满意的。 这段经历使我想重新回到我在大学里讲过的电气工程这个话题,以便我更好地理解这些解决方案的构思和创建方式。

获得生活中的SpaceOrb (Get the SpaceOrb in your life)

If you think this is as awesome as I do, donate to Vic's project, as I did, on SourceForge. Get an OrbShield 1.0 Kit and an Arduino Duemilanove with ATMega328 and go find a SpaceOrb wherever you can! Enjoy, and thanks to Vic and the folks at the SpaceOrb boards for this wonderful solution.

如果您认为这和我一样出色,请像我一样在SourceForge上捐赠给Vic的项目。 获得带有ATMega328OrbShield 1.0套件Arduino Duemilanove,并尽可能找到SpaceOrb! 享受,并感谢维克(Vic)和SpaceOrb董事会成员提供的这一出色解决方案。

翻译自: https://www.hanselman.com/blog/the-best-controller-for-fps-a-spacetec-spaceorb-360-controller-working-with-windows-7-using-arduino-and-orbshield

arduino温度控制器

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值