Channels ▼


Data Manipulation By Accelerometer, Gyroscope, and Magnetometer

This month has seen the launch of techBASIC, a programming tool that allows users to collect, manipulate, and display numerical data collected using the iPhone and iPad's internal sensors. Running under iOS 5, techBASIC gathers data from sensors including the iPad's internal accelerometer, gyroscope, magnetometer, and "location and heading" functions. The software then displays the results in the form of images that can a user can twist, pan, zoom into, and manipulate.

This tool is designed for users looking for a somewhat quirky and relatively simple means of displaying data. Built-in graphing and matrix commands are used to create a plot with only a few lines of code. After the program finishes running, the plots are still dynamic and a user can pan and zoom plots or rotate 3D plots along an arbitrary axis. Users can choose from two- or three-dimensional Cartesian axes, or polar, spherical, or cylindrical axes.

The heart of techBASIC is an implementation of the BASIC programming language, complete with advanced matrix commands. A user can multiply or add matrices the same way most languages multiply or add numbers. There is also the option to use advanced functions like INV, which returns the inverse of a matrix. A user can write their own programs and read and manipulate the contents of existing data files. Logically then, this software provides the option to use iTunes to move programs and data back and forth between iPad or iPhone and a desktop computer.

The software's maker Byte Works further explains, "If you run into a bug while running a BASIC program, drop into techBASIC's step-and-trace debugger to squash that bug. You can view the call stack, variables, and even expand the contents of any variable in a scrollable callout to see the entire variable value — even the contents of a large matrix. Error messages that pop up in your code help pinpoint mistakes — and an online help system gives you all of the details about the language."

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.