Skip to content

Instantly share code, notes, and snippets.

@jorgeguberte
Created May 14, 2014 18:54
Show Gist options
  • Save jorgeguberte/1c254c12ef89d2298262 to your computer and use it in GitHub Desktop.
Save jorgeguberte/1c254c12ef89d2298262 to your computer and use it in GitHub Desktop.
var THRESHOLD_1 = 300;
var THRESHOLD_2 = 3000;
var THRESHOLD_3 = 3500;
var input_threshold = 500;
//Quando ocorrer o input
if(input_threshold >= THRESHOLD_1 && input_threshold < THRESHOLD_2)
//dispara primeiro gatilho
if(input_threshold >= THRESHOLD_2 && input_threshold < THRESHOLD_3)
//dispara segundo gatilho
if(input_threshold >= THRESHOLD_3)
//dispara terceiro gatilho
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment