THE KNOB II
Video

THE KNOB II – Wifi-Hardware

You know, I’m addicted to rotating knobs. And this is my new version. This one works over Wifi. So it works for desktop and mobile, native and Adobe Air. It is build with an Arduino Leonardo, a RedFly Wifi Shield and a ProtoShield with 10 buttons, 1 rotary encoder and 3 LEDs.

On the software side I’m using the OSC protocol over UDP which is very fast and responsive.

Adobe AIR Gyroscope Native Extension with Euler Angles (roll, pitch, yaw) for iOS

UPDATE: I have released the extension including source on google code with some changes.
Euler Gyroscope ANE on Google Code

I baked my very first AIR iOS Native Extension. It’s just an adapted version of this version from Adobe. Because in my opinion the data of radians per second aren’t really good to handle. So I looked into Apples API documentation and found out that there are Euler Angles in the CMMotionManager CMDeviceMotion classes. So I just changed a few lines in the Objective-C Code. I learned much from this tutorial Native Extionsion for Adobe AIR and iOS 101 by Liquid Photo

NSString *myStr = [NSString stringWithFormat:@"%f&%f&%f&%f&%f&%f", 
rotate.x, 
rotate.y, 
rotate.z, 
motionManager.deviceMotion.attitude.roll, 
motionManager.deviceMotion.attitude.pitch, 
motionManager.deviceMotion.attitude.yaw];

[motionManager startDeviceMotionUpdates];

motionManager.deviceMotionUpdateInterval = 0;

And added these three parameters roll, pitch and yaw to the Actionscript Gyroscope Event.

new GyroscopeEvent(GyroscopeEvent.UPDATE, _x, _y, _z, _roll, _pitch, _yaw)

You can download source and final iOS .ane Native Extension file here:
iOS Air Native Extension Gyroscope – with Euler Angles

Adobe AIR 3: How to build a Captive Runtime, Standalone Bundle Executable App

The challenge was to build a Adobe Air 3 Standalone Executable. Also called a „Captive Runtime“ or a Bundle.

Here are some better descriptions:
http://www.adobe.com/devnet/air/articles/air3-install-and-deployment-options.html

But it was not so easy as it sounds because the order of the adt options are very important!

If the order isn’t correct you get the error „-storetype is required„.

And if you are behind a firewall or no internet connection, the timestamp server isn’t reachable. So use „-tsa none“ if you get „Could not generate timestamp: Connection timed out: connect„.

Here is my ant task which do the job with the correct order. But the order of the options in a terminal command should be the same.

<target name="07. [package exe]">
	<mkdir dir="${publish.dir}"/>
	<input message="certificate password:" addproperty="certPassword" />
	<java jar="${sdk.dir}/${adt}" fork="true" failonerror="true" dir="${deploy.dir}/">
		<arg value="-package" />
		<arg value="-keystore"/>
		<arg value="${air.certificate}"/>
 
		<!-- NATIVE_SIGNING_OPTIONS -->
		<arg value="-storetype"/>
		<arg value="pkcs12"/>
		<arg value="-storepass"/>
		<arg value="${certPassword}"/>
		<!-- <arg value="-tsa" />
		<arg value="none" /> -->
		<arg value="-target" />
		<arg value="bundle" />
		<!-- Name Of File To Create-->
		<arg value="${publish.dir}/${publish.exe}" />
		<!-- App Descriptor-->
		<arg value="${application.descriptor}" />
		<!-- Files To Package -->
		<arg value="Icon*" />
		<arg value="Default*" />
		<arg value="iTunesArtwork.png" />
		<arg value="-C" />
		<arg value="${deploy.dir}/" />
		<arg value="${deploy.swf}" />
	</java>
</target>

Hope this helps some people having the same problems.