Skip to content

Instantly share code, notes, and snippets.

@jacopocolo
Last active September 4, 2018 12:48
Show Gist options
  • Save jacopocolo/8568bc1aa6022136dea0247bf42ae824 to your computer and use it in GitHub Desktop.
Save jacopocolo/8568bc1aa6022136dea0247bf42ae824 to your computer and use it in GitHub Desktop.
Deep Sleep state
Deep Sleep state
detect proximity -> Half wake with name
detect presence -> Half wake without names
Half wake state
Half wake without names
tap -> Awake
detect proximity -> Awake with names
Half wake with name
tap -> Awake
timeout 2min -> Deep Sleep state
Awake state
timeout 2min -> Deep Sleep state
Awake
Awake with names
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment