Spectacle User's Guide

Pages
Contributors: SFUptownMaker

Spectacle Concepts

Momentary versus continuous events

Some events in Spectacle will generate a "one-and-done" pulse, and some will generate a continuous signal. What happens with these signals depends upon what sort of action the signal is connected to.

Example: Inertia board and Sound board

Imagine we have system with an inertia board and a sound board, configured as above.

By the settings you can imagine what will happen: a sound will play when the inertia board is moved. But what happens if the inertia board keeps moving? It will continue to send its signal on channel 0, and the sound board will continue to receive it, and two seconds after the sound starts playing (regardless of the actual length of the sound), the sound will play again. This will continue until the inertia board is allowed to stop moving--a continuous output signal.

To play the sound only once, upon the first motion of the inertia board, what should we change? We would change the check box on the "sense motion" action from "while" to "if".

Example: Button board and Light board

Now let's look at a momentary example, and how not to use it.

Consider the system described above. One may assume that, when pressed, the flame effect would begin on strip 1 of the light board. And that's true, it will. However, since the flame effect is a continuous effect (that we want to run indefinitely) and the button press is momentary (it only issues a signal when the button is initially pressed), the effect will be brief--probably so brief as to not even be visible to the user.

So what should we change to get what we want? We have a couple of options, looking at the actions available to the button board:

Looking over our available choices, "Action while Holding" and "Latch On/Latch Off" sound like they'll produce a continuous output suitable for triggering our continuous flame effect. Using one of them (depending on whether you want to have to hold the button or just turn it on and off) will get us the behavior we desire.

In 2003, CU student Nate Seidle fried a power supply in his dorm room and, in lieu of a way to order easy replacements, decided to start his own company. Since then, SparkFun has been committed to sustainably helping our world achieve electronics literacy from our headquarters in Boulder, Colorado.

No matter your vision, SparkFun's products and resources are designed to make the world of electronics more accessible. In addition to over 2,000 open source components and widgets, SparkFun offers curriculum, training and online tutorials designed to help demystify the wonderful world of embedded electronics. We're here to help you start something.