To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example use an App Sensor Data publishes all of your accelerometer data from your iPhone to UDP. The controls you get are forwards/ Backwards, left/ right. Driving a Mindstorm around the office and controlling webpages (page up/ down, back and forward). but you could also use it to control the mouse or map to keys on the keyboard and play computers games with it.
Description
Before I go on to make this vi work you will need to download an app from the app store, Sensor Data. This app comes in at £5.99, which is steep (this is not mine or any of my friends app and I am not benefiting from sales of this app), but once you have this app and combine it with LabVIEW you can do anything!
The App, Sensor Data, publishes all of your accelerometer data from your iPhone to UDP, in fact you can stream this data over UDP. Then using LabVIEW (only 3 Icons, UDP Open, UDP Read and UDP Close) you can stream this data to your PC on your local Wifi.
Once you have this information in your PC you can then start to experiment. This vi, "Control Anything" just looks at the Pitch and Roll of the phone, (if you look in the subVI I am actually taking the Pitch, Roll, Yaw and Compass reading, but only using the Pitch and Roll)
Requirements
Steps to Implement or Execute Code
Additional Information or References
Front Panel
VI Snippet
NOTE: I have tested the app with an iPhone 4S and it runs fine, except for it crashing every time I sleep my phone. The app is not cheap so please read the app reviews before buying and make your own decision on whether you should buy it or not.
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Hi Dan Vickers,
Thanks for this cool Vi, I am wondering, will it work with my iPad3? will it damage the ipad? Thanks again.
Hi Dan,
I am trying to use the VI and the Sensor Data exactly as you have described and written it. I seem to always get an Error 56 like the phone and the PC aren't talking. Do you know of anyway to do a simple check to see what is wrong? both the PC and the phone have the same Wi-Fi Network conection. It is an Ad-hoc connection, would this make any difference?
Thanks