Sanasar
Published © GPL3+

Smarty Pants Tap

Super FUN family trivia where you have 90 seconds to answer as many questions correctly. But you need to be quick and tap your button first!

IntermediateShowcase (no instructions)6 hours715
Smarty Pants Tap

Things used in this project

Story

Read more

Schematics

Amazon Alexa - Echo Buttons Schematic

This is the current schematic on how the skill works with Alexa and Echo buttons. Original source: https://developer.amazon.com/docs/gadget-skills/understand-gadgets-skill-api.html

Code

Smarty Pants Tap Winner

JavaScript
Blinking animation to denote the winner of the round
// GRABBED FROM: https://developer.amazon.com/docs/gadget-skills/echo-button-animations.html
// ANIMATION: BLINK
function blinkAnimationBuilderHelper(targetGadgets, index, triggerEventTimeMs) {
const animationsArray = [
{
repeat: 8,
targetLights: ['1'],
sequence: [
{
durationMs: 250,
color: COLORS[index].dark,
blend: false,
},
{
durationMs: 250,
color: COLORS[index].hex,
blend: false,
},
{
durationMs: 250,
color: COLORS[index].light,
blend: false,
},
{
durationMs: 250,
color: '000000',
blend: false,
},
],
},
];

this
.alexaSkill()
.gadgetController()
.setNoneTriggerEvent()
.setAnimations(animationsArray)
.setLight(targetGadgets, triggerEventTimeMs);
}

Credits

Sanasar
1 project • 0 followers
Contact

Comments

Please log in or sign up to comment.