andy 发表于 2011-12-28 22:36:18

IPhone Ipad 作为四轴遥控 RCKit library for Arduino 四轴利器(二)

IPhone Ipad 作为四轴遥控 RCKit library for Arduino四轴利器(二)

为Arduino的RCKit库
This is the Arduino RCKit 1.1 library.这是Arduino的RCKit 1.1库。

RCKit provides a kit of software objects that make it easy to build an RCOIP (Remote Control Over IP) receiver on Arduino. RCOIP protocol is used to carry remote control commands from a transmitter to a receiver over an IP transport such as Ethernet or Wi-Fi. RCKit提供了一个对象,可以很容易地建立一个软件套件RCOIP (IP远程控制)接收器上的Arduino的RCOIP协议是用于从发射机进行比如以太网或IP传输无线接收远程控制命令。连接。

As such it can be used to build Remote Controlled (RC) vehicles and devices of various kinds, along with matching transmitters.因此,它可以用来建立远程控制(RC)的车辆和各种设备,相匹配的发射器。 Large numbers of channels can be supported, along with a back-channel which sends data from the Receiver to the Transmitter.可以支持大量的通道,以及一个后端通道,从接收器发送数据变送器。 A compatible iPhone transmitter app is also available.一个兼容的iPhone发射器的应用程序也可以。

The transmitter could be a handheld Wi-Fi enabled device such as an iPhone, iPad or Arduino based device.发射器可手持Wi - Fi功能作为一个iPhone,iPad或Arduino的基础设备等设备。 Or it could be an interactive program running on a desktop computer.或者,它可能是一个交互式的程序,一台台式电脑上运行。 The RCTx iPhone transmitter app is available on the Apple App Store. RCTx的iPhone发射器的应用程序是苹果App Store上提供。 It provides a simple RCOIP transmitter equipped with 2 joysticks and a number of switches.它提供了一个简单RCOIP的发射机配备2操纵杆和交换机数量。

The receiver (using this RCKit software) could be a remote controlled car, plane, helicopter or some other device.接收器(使用此RCKit软件)可以遥控汽车,飞机,直升机或其他一些设备。

The RCOIP protocol is a 2-way protocol that defines UDP messages between the RCOIP transmitter and receiver. RCOIP协议是一个2路的协议,它定义 RCOIP发射器和接收器之间的UDP消息。 This effectively makes the transmitter a UDP client and the receiver a UDP server.这将有效地使发射器一个UDP客户端和接收UDP服务器。 Messages sent from the transmitter to the receiver include setting analog outputs, and messages from the receiver to the transmitter include receiver status messages.从发射器发送到接收的消息,包括设置模拟输出,并从接收机到发射机的消息,包括接收器的状态信息。

RCTx, RCKit and the RCOIP protocol offer the following advantages over conventional Remote Control: RCTx,RCKit和RCOIP协议提供了比传统的遥控器具有以下优点:

Large numbers of channels (> 100) not just 5 or 6, including analog, digital, text, data etc.大量的渠道(> 100)不只是5或6,包括模拟,数字,文字,数据等
Back channel for telemetry (voltages, signal strengths, GPS position etc)回到通道遥测(电压,信号强度,GPS定位等)
Failsafe modes故障安全模式
Programmable, configurable and extensible可编程,可配置和可扩展
Works with a variety of types of vehicle and remote devices可与多种类型的车辆和远程设备
Hackable容易被破_解
Opportunity to tightly integrate remote control and autonomous vehicle software control机会紧密结合远程控制和自主汽车软件控制
Works with a variety of IP transports Wi-Fi (ad-hoc or infrastructure), Wired etc.各种知识产权的作品传输的Wi - Fi(特设或基础设施),有线等。
Videos explaining how it works and what you can do with it can be found at:视频,解释它是如何工作,你可以用它做什么,可以在这里找到:
http://www.youtube.com/watch?v=SKwY-CcotRY http://www.youtube.com/watch?v=SKwY-CcotRY
http://www.youtube.com/watch?v=i0ZogFmytPI http://www.youtube.com/watch?v=i0ZogFmytPI
There is also a video showing how RCKit can be used with the IRrc library at http://www.open.com.au/mikem/arduino/IRrc to control a 3 channel infra-red model helicopter at:还有一个视频显示如何RCKit IRRC库可用于http://www.open.com.au/mikem/arduino/IRrc控制3通道红外线模型直升机:
http://www.youtube.com/watch?v=lzRpyqnD6_M http://www.youtube.com/watch?v=lzRpyqnD6_M
The version of the package that this documentation refers to can be downloaded from http://www.open.com.au/mikem/arduino/RCKit/RCKit-1.1.zip You can find the latest version at http://www.open.com.au/mikem/arduino/RCKit本文档是指包的版本可以下载 http://www.open.com.au/mikem/arduino/RCKit/RCKit-1.1.zip你可以找到最新版本http://www 。 open.com.au / mikem /阿尔杜伊诺/ RCKit
Tested on Arduino Duemilanove, Diecimila, Mega and Asynclabs Yellowjacket with arduino-0018 on OpenSuSE 11.1 and avr-libc-1.6.2-5.11, cross-avr-binutils-2.19-9.1 and cross-avr-gcc43-4.3.3_20081022-9.3测试Arduino的Duemilanove,Diecimila,openSUSE的11.1和AVR的libc - 1.6.2 - 5.11,跨AVR与binutils - 2.19 - 9.1和跨AVR - gcc43 - 4.3.3_20081022 - 9.3米加和Asynclabs与Arduino - 0018 Yellowjacket


Setters 塞特
Setter are object that receive a value, maybe transform it and then do something with it. 二传手是对象,收到一个值,也许改造它,然后用它做的东西。 Typically they set an output pin according to the received input value, but almost any other transformation, output or communication can be imagined.通常情况下,他们设置了输出引脚根据接收到的输入值,但几乎任何其他转换,输出或通讯可想而知。
The following output Setter objects are provided with RCKit.以下输出的 setter对象提供的RCKit 。 They can be used to translate receiver channel values into physical outputs:它们可用于接收器通道值转化成物理输出:

AnalogSetter AnalogSetter
DigitalSetter DigitalSetter
ServoSetter ServoSetter
AccelStepperPositionSetter AccelStepperPositionSetter
AccelStepperSpeedSetter AccelStepperSpeedSetter
HBridgeSetter HBridgeSetter
DifferentialSetter DifferentialSetter
The following transformation Setter objects are provided with RCKit.以下改造二传手对象提供的RCKit。 They can be used to transform receiver channel values before being given to one of the output Setter classes above:它们可以被用来输出之前转换接收器通道值的setter类以上:
Inverter 逆变器
Limiter 限制器
Linear 线性
RCRx RCRx
RCRx class is a Wi-Fi RCOIP receiver. RCRx类是一个Wi - Fi RCOIP接收。 It works with Arduino and WiShield and any RCOIP compliant Wi-Fi Transmitter (such as the RCTx iPhone app available on the Apple App Store).它的工作原理与Arduino和WiShield任何RCOIP兼容的Wi - Fi发射器(如苹果App Store上提供的RCTx iPhone应用程序)。
By default, RCRx is configured as an Ad-Hoc Wi-Fi network with SSID of 'RCArduino' By default, the network is Open (ie no encryption) and It is configured with a static IP address of 169.254.1.100. RCRx默认情况下,作为一个特设的Wi - Fi网络SSID为“RCArduino'默认情况下配置,网络是开放的(即没有加密),它是一个静态的IP地址169.254.1.100配置。 These setting can be changed by editing RCRx.cpp in the RCKit distribution.这些设置可以改变编辑RCKit分布RCRx.cpp。

When the RCRx object is constructed, it must be given an array of Setter objects.当RCRx构造对象,它必须得到一个数组的setter对象。 When a RCOIPv1CmdSetAnalogChannels is received by RCRx , The Setter corresponding to each Channel value in the RCOIPv1CmdSetAnalogChannels command will be passed to the respective Setter in the analogOutputs array.当RCOIPv1CmdSetAnalogChannels收到RCRx ,相应的 setter RCOIPv1CmdSetAnalogChannels命令中的每个通道值将被传递到各自的 setter在analogOutputs数组。 The Arduino software is expected to be configured so that each analogOutput is connected to a Setter that will implement the received value, perhaps by setting an analog or digital output on an Arduino pin. Setter objects are provided to achieve this. Arduino软件预计将配置,使每个analogOutput连接到的二传手,将实施接收到的值,也许是通过设置一个Arduino的引脚上的模拟或数字输出。二传手对象提供实现这一目标。

RCRx will automatically respond to received commands with RCOIPv1ReplyReceiverStatus messages as appropriate to the configured timeouts etc. See the RCOIP protocol document for more details. RCRx将自动响应接收到的命令RCOIPv1ReplyReceiverStatus消息,适当配置超时等RCOIP为更多细节请参阅协议文档。


Example Sketches 范例素描
Several example Arduino sketches are included, including a regression test suite and a sample complete 5 channel receiver with Servo outputs.几个例子Arduino的小品都包括在内,包括回归测试套件和一个样品完成5伺服输出通道接收机。
The following example sketches are provided:下面的例子草图:

TestSuite TestSuite的
RCRx RCRx
HBridgeRCRx HBridgeRCRx
HBridge2RCRx HBridge2RCRx
DifferentialRCRx DifferentialRCRx
RCTx iPhone App RCTx iPhone应用程序
RCTx is an RCOIP compliant transmitter for iPhone available on the Apple App Store at http://itunes.apple.com/app/rctx/id377833472?mt=8 RCTx是一个RCOIP为iPhone兼容发射器可在苹果App Store http://itunes.apple.com/app/rctx/id377833472?mt=8
It presents a simulated RC transmitter with 2 joysticks and a number of switches.它提出了一个模拟RC发射器,2操纵杆和交换机数量。 The left josystick sets channels 0 and 1 and the right joystick channels 2 and 3.左josystick设置通道0和1,右操纵杆通道2和3。 The switches set channels 4 through 9 inclusive.开关设置通道4到9(含)。 The one connected to channel 4 is momentary contact.一个连接通道4是短暂的接触。 The install and configure RCTx:安装和配置RCTx:

install the RCTx app on your iPhone. RCTx应用程序安装在您的iPhone。
Build and upload your RCRx program you your Arduino+WiShield hardware建立和上传你的RCRx计划你的Arduino的+ WiShield硬件
Power up the Arduino电源,阿尔杜伊诺
Turn on your iphone, go to Settings, Wi-Fi.打开你的iPhone,去设置,无线网络连接。 Enable Wi-Fi启用Wi - Fi
After about 30 seconds, you should see the RCArduino network appear as an available network on the iPhone.约30秒后,你应该看到RCArduino网络出现在iPhone上可用的网络。 Tap on it.点击就可以了。 Now tap on the RCArduino network details arrow to the right of the RCArduino line.现在自来水RCArduino网络细节箭头RCArduino行的权利。 Select 'Static'.选择“静态”。 Enter an IP Address of 169.254.1.1.输入169.254.1.1的IP地址。 Enter a Subnet Mask of 255.255.0.0输入了255.255.0.0的子网掩码
After about 10 seconds, the iPhone should be successfully connected to the RCArduino network.约10秒后,应在iPhone成功连接到RCArduino网络。 You now have an ad-hoc connection to the Arduino.你现在有一个ad - hoc连接到Arduino。 The Arduino will have the address 169.254.1.100 and the iPhone wil have address 169.254.1.1 Arduino的将地址169.254.1.1 169.254.1.100的地址和iPhone的WIL
Start the RCTx app on the iPhone.开始在iPhone上的RCTx的应用程序。
After about 5 seconds, you should see the NO CONNECT in the bottom left corner change to show RSSI and the correct battery voltage (if the Arduino is so equipped).约5秒钟后,你应该看到的NO连接显示在左下角的变化RSSI和正确的电池电压(如果Arduino是配备)。
Move the josticks and buttons.移动josticks和按钮。 This will send RCOIP commands to the Arduino. RCRx in the arduino will convert them to analog output signals to drive your hardware.这将发送RCOIP命令到Arduino。 RCRx在Arduino的将它们转换为模拟输出信号来驱动你的硬件。 Have fun.有情趣。
Prerequisites 先决条件
Requires:要求:
WiShield ( http://asynclabs.com ) WiShield( http://asynclabs.com )
AccelStepper ( http://www.open.com.au/mikem/arduino/AccelStepper ) libraries to also be installed. AccelStepper( http://www.open.com.au/mikem/arduino/AccelStepper )库,也可以安装。
Installation 安装
Install in the usual way: unzip the distribution zip file to the libraries sub-folder of your sketchbook.在通常的方法安装:解压缩分发的zip文件到您的速写本子文件夹的图书馆。

Author: 作者:
Mike McCauley ( mikem@open.com.au )麦克麦考利( mikem@open.com.au )
This software and the RCOIP protocol is Copyright (C) 2010 Mike McCauley.该软件和RCOIP协议版权所有(C)2010麦克麦考利。 Use is subject to license conditions.使用是受牌照条件。 The main licensing options available are GPL V2 or Commercial:主要可用的授权选项是GPL V2或商业:

Open Source Licensing GPL V2 开源许可GPL V2
This is the appropriate option if you want to share the source code of your application with everyone you distribute it to, and you also want to give them the right to share who uses it.这是适当的选项,如果你想与大家分享您分发到您的应用程序的源代码,并你也想给他们有权分享使用它的人。 If you wish to use this software under Open Source Licensing, you must contribute all your source code to the open source community in accordance with the GPL Version 2 when your application is distributed.如果你想使用这个软件开源许可下,你必须根据GPL第二版时,您的应用程序是分布式的开源社区作出贡献的所有源代码。 See http://www.gnu.org/copyleft/gpl.html参见http://www.gnu.org/copyleft/gpl.html
Commercial Licensing 商业许可
This is the appropriate option if you are creating proprietary applications and you are not prepared to distribute and share the source code of your application.这是适当的选项,如果您正在创建的专有应用和你不准备分发​​和共享您的应用程序的源代码。 Contact info@open.com.au for details.有关详细信息,联系info@open.com.au 。
Revision History 修订历史
Version: 版本:
1.0 Initial release 1.0初始版本










详情可到以下网站

用IPhone Ipad WIFI 遥控 RCKit library for Arduino 遥控微型直升机视频
http://www.youtube.com/watch?v=lzRpyqnD6_M

http://cache.amobbs.com/bbs_upload782111/files_49/ourdev_708570G1J4KS.JPG
(原文件名:RCKi.JPG)



http://itunes.apple.com/app/rctx/id377833472?mt=8

http://www.open.com.au/mikem/arduino/RCKit/

http://www.youtube.com/watch?v=SKwY-CcotRY

http://www.youtube.com/watch?v=i0ZogFmytPI

Name_006 发表于 2011-12-28 23:49:23

好是好。 但玩不起来啊

stdio 发表于 2011-12-29 01:29:38

正在做有关这个的。。。

FpvCamera 发表于 2012-1-31 15:57:23

我有类似的产品了,呵呵

MakeItToday 发表于 2012-2-12 08:49:04

简练的优势

ksh84222 发表于 2012-6-3 10:33:56

好东西,MARK

Rocky_Zou 发表于 2012-6-3 11:39:53

没米啊没不起 苹果的玩意{:lol:}
页: [1]
查看完整版本: IPhone Ipad 作为四轴遥控 RCKit library for Arduino 四轴利器(二)