- Receiver adds intent
- Can send arbitrary byte data
- Specify a different layout for the lockscreen
| Make the starter the night before by mixing together with your fingers: | |
| 1 cup (4 ¼ ounces) King Arthur Unbleached All-Purpose Flour (or ¾ cup all-purpose flour + ¼ cup whole wheat flour) | |
| 3/4 cup (6 ounces) room-temperature water | |
| 1 pinch yeast | |
| Cover and let sit at room temperature overnight. | |
| If you need to speed this up, let it sit in the oven with the oven light on for about 6 to 7 hours, and it should be ready to use. |
| /** | |
| * Designed for use with two 74HC595N shift registers, | |
| * one AT28C64B EEPROM, and an Arduino Micro. | |
| * | |
| * Based on work by Ben Eater from https://www.youtube.com/watch?v=K88pgWhEb1M | |
| */ | |
| // Arduino pins connected to the shift register pins | |
| #define SHIFT_DATA 2 | |
| #define SHIFT_CLK 3 |
| String speechMarkup = new SsmlBuilder() | |
| .sentence("Welcome to Fabric!") | |
| .sentence(s -> s.text("To get started, please visit fabric dot").spellOut("IO").text("slash home")) | |
| .sentence("Apps that you mark as favorites will be included in your briefings") | |
| .build(); | |
| // speechMarkup gets SSML equivalent to: | |
| // | |
| // <speech> | |
| // <s>Welcome to Fabric!</s> |
| package com.mikefurtak.speechlet; | |
| import com.amazon.speech.ui.SsmlOutputSpeech; | |
| import com.amazonaws.util.StringInputStream; | |
| import org.xml.sax.SAXException; | |
| import javax.xml.parsers.DocumentBuilderFactory; | |
| import javax.xml.parsers.ParserConfigurationException; | |
| import java.io.IOException; |
| { | |
| "intents": [ | |
| { | |
| "intent": "SummaryIntent" | |
| }, | |
| { | |
| "intent": "BriefingIntent", | |
| "slots": [ | |
| { | |
| "name": "Metric", |
| package io.fabric.alexaskills.util; | |
| import java.util.function.Consumer; | |
| public class SsmlBuilder implements SsmlPhrase { | |
| private final StringBuilder stringBuilder; | |
| private boolean built = false; | |
| public SsmlBuilder() { | |
| stringBuilder = new StringBuilder(); |
| switch (metric) { | |
| case "status": | |
| return buildStatusResponse(); | |
| case "stability": | |
| return buildStabilityResponse(); | |
| case "growth": | |
| return buildGrowthResponse(); | |
| case "retention": | |
| return buildRetentionResponse(); | |
| default: |
| switch (metric) { | |
| case "status": | |
| return buildStatusResponse(); | |
| case "ability": // Close enough! | |
| case "stability": | |
| return buildStabilityResponse(); | |
| case "grove": // Uh, sure. | |
| case "gross": // This is how I feel. | |
| case "growth": | |
| return buildGrowthResponse(); |
| hourPaint = new Paint(); | |
| hourPaint.setARGB(255, 200, 200, 200); | |
| hourPaint.setStrokeWidth(6F); | |
| hourPaint.setAntiAlias(true); | |
| hourPaint.setStrokeCap(Paint.Cap.ROUND); | |
| // ... | |
| float hrX = (float) Math.sin(hrRot) * hrLength; | |
| float hrY = (float) -Math.cos(hrRot) * hrLength; |