Spectacle Inertia Board Hookup Guide a learn.sparkfun.com tutorial

Available online at: http://sfe.io/t634

Contents

Spectacle Inertia Board

The Spectacle Inertia Board makes it easy to sense motion or orientation with a Spectacle project.

Spectacle Inertia Board

DEV-13992
Retired

tl;dr (essentials)

  1. The Inertia Board can sense motion, lack of motion, orientation, or acceleration.
  2. It's capable of either momentary triggers or continuous triggers.

Meet the Spectacle Inertia Board

The Spectacle Inertia Board is designed to allow a Spectacle project to detect its orientation, whether it is moving or stationary, or whether it is under acceleration.

It has two 1/8" (3.5mm) jacks for Spectacle control signals. Pay attention to the directionality of the jacks! The one labeled "In" should be plugged into a board that is closer to the Director Board than the Inertia Board is, or into the Director Board itself.

IO Jacks

Suggested Reading

Before proceeding, you should read through the Spectacle User's Guide. It will give you the basics you'll need to know about how Spectacle works to follow the rest of this tutorial.

The Configuration Utility

Inertia board action options

There are three different actions which can be assigned to the inertia board, allowing you to sense several different options of motion and orientation. We'll explain them one at a time below.

Sense All Motion

Sense all motion options

This action sends out a trigger when the board is either moving or stationary. When the board is moved, the trigger signal will be sent nearly immediately. When the board goes from moving to stationary, however, there is a delay of a couple of seconds before the trigger signal comes out.

Sense Orientation

Sense orientation settings

Another sensing application for the Inertia Board is orientation. Each face and edge of the Inertia Board has a name associated with it (A-D, Top, or Bottom). The board can output a signal when any of these sides is up, either only when it initially becomes face up or continually as long as it is face up.

Measure Acceleration

Measure acceleration options

The final sensing option is to measure acceleration. The output can be between 0 and 1000, depending on the acceleration of the board. The axis along which the acceleration is being measured is defined by the check boxes, and acceleration in a positive direction will be greater than 500 while a negative acceleration will be less than 500.

We recommend experimentation as the best way to figure out how this mode works.

Example Project

Let's make a simple project using the Spectacle Audio Board and the Spectacle Inertia Board! We'll set it up so that a sound is played whenever the Inertia Board is moved.

Connect the boards

To follow this tutorial, you'll need this hardware:

microSD USB Reader

microSD USB Reader

COM-13004
$5.50
12
Wall Adapter Power Supply - 5.1V DC 2.5A (USB Micro-B)

Wall Adapter Power Supply - 5.1V DC 2.5A (USB Micro-B)

TOL-13831
$8.95
22
Hamburger Mini Speaker

Hamburger Mini Speaker

COM-14023
$5.50
2

Spectacle Inertia Board

DEV-13992
Retired

Spectacle Audio Board

DEV-14034
Retired

Audio Cable TRRS - 3ft

CAB-14164
Retired

microSD Card with Adapter - 16GB (Class 10)

COM-13833
6 Retired

Spectacle Director Board

DEV-13912
Retired

Note that you will need three of the TRRS cables!

First, plug one end of one of the TRRS cables into the "Direct" jack on the Director Board.

The direct jack

Next, take the other TRRS cable and plug it into the "Program" jack on the Director Board.

The program jack

Take the other end of this cable and plug it into the audio jack of the phone, tablet, or computer that you'll be using to program the system.

Into the phone jack

Plug the other end of that cable into the "In" jack on your Audio Board.

Plugging into the in jack on the audio board

Plug the speaker into the Audio Out port on the Audio Board.

Plugging in the speaker

Take another one of the TRRS cables and plug one end into the "Out" port on the Audio Board...

Plugging into the out jack on the audio board

...and plug the other end of that cable into the "In" port on the Inertia Board.

Plug the other end into the inertia board

Finally, plug the Micro B end of the power adapter into the Director Board and the other end of the adapter into the wall. You should see one solid light and one blinking light on the Inertia Board and the Audio Board. On the Director Board, you'll see one solid light and one light which blinks one time, then pauses, then repeats. This shows that power is present and the boards are up and running.

Setting up the board configuration

When you first visit the Spectacle configuration website, you'll be presented with a screen that looks like this. Your project name will differ, however, as Spectacle assigns a new name to each project. To continue, we're going to have to add our Audio Board to the project.

Blank project

Click on the "Add a Board" button, as highlighted above, to bring up a list of available boards.

Add a board button

In the list, click anywhere in the "Audio" box to add an Audio Board to our project.

Board list

You'll be returned to the main project page, but this time, an Audio Board will appear in the list on the page. Repeat these two steps to add an Inertia Board to the project.

Main page with audio board

Here you can see both boards in the list in place. Next we'll need to add actions to the boards.

List with both boards in place

You can see highlighted above the clapboard icons which, when clicked, will take you to the "Actions" page, where you can assign an action to your board. Let's start by assigning an action to the Audio Board.

Add actions buttons

An empty page will come up. There are no currently assigned actions, so we'll need to assign some. Click the "Add an Action" button at the bottom of the page.

Empty actions page

As you can see, the Audio Board only has one action. Click on "Play Sound" to add this action to your Audio Board.

There's only one action for the sound board

Here are the various settings for the "Play Sound" action. Copy the settings as I've entered them into you project.

Settings for play sound

Click on the "Go Back" button at the bottom of the page to return to the main page, then click on the clapboard icon for the Inertia Board to add an action. When the empty list pops up, click the "Add an Action" button at the bottom to bring up the list of actions for the Inertia Board.

The Go Back button

Here's the list of actions for the Inertia Board. We want to detect when motion occurs, so click the first option, "Sense All Motion".

Inertia board actions

Here's the options page for the sense motion action. Note the choices I've made and duplicate them for your project, then click "Go Back".

Sense motion options

Congratulations! Your project is completed. Now let's upload it to the Director Board.

Project done

Installing a project on the Director Board

Now that you've created your Spectacle program it's time to upload it to the Director Board. If you followed the instructions above, your uploading device is connected to the board and ready to go, so all you need to do is touch the "Install Script" button at the bottom of the page. That will bring up the page seen below.

Upload page

Make sure the volume on your device is turned all the way up, and that no other audio source (music, video, etc) is playing in the background. Then press and hold the "RST" button on the Director Board, press and hold the "PROG" button, then release the "RST" button.

This will put the Director Board into program mode. You'll see the light on the board blink three times, pause, then repeat. This is your visual indicator that the board is in program mode. Once you've established that the board is in program mode, you can begin programming by touching the "Install" button on the Spectacle app screen. The button will gray out during the programming process, which should only last for a few seconds. Once programming is done, you'll see the light on the Director Board blink 10 times, pause, then repeat. That's your cue that the program was uploaded successfully.

Press the "RST" button again to reset the system and begin the program!

If you have any troubles, visit the troubleshooting page for help resolving your issues.

Resources and Going Further

For general Spectacle information, please check out the user guide:

Spectacle User's Guide

May 4, 2017

The Spectacle system is designed to help those without electronics or programming experience integrate electronics into projects.

Check out the additional Spectacle guides below:

Spectacle Sound Kit Hookup Guide

All the information you need to use the Spectacle Sound Kit in one place.

Spectacle User's Guide

The Spectacle system is designed to help those without electronics or programming experience integrate electronics into projects.

Spectacle Light and Sound Kit Hookup Guide

All the information you need to use the Spectacle Light and Sound Kit in one place.

Spectacle Light Kit Hookup Guide

All the information you need to use the Spectacle Light Kit in one place.

Spectacle Button Board Hookup Guide

All the information you need to use the Spectacle Button Board in one place.

Spectacle Motion Kit Hookup Guide

All the information you need to use the Spectacle Motion Kit in one place.

Spectacle Motion Board Hookup Guide

All the information you need to use the Spectacle Motion Kit in one place.

Spectacle Example: Super Mario Bros. Diorama

A study in building an animated diorama (with sound!) using Spectacle electronics.

learn.sparkfun.com | CC BY-SA 3.0 | SparkFun Electronics | Niwot, Colorado