Skip to content

Instantly share code, notes, and snippets.

@taktran
Created May 8, 2015 11:26
Show Gist options
  • Save taktran/76ee6b97e7cc54c6cb20 to your computer and use it in GitHub Desktop.
Save taktran/76ee6b97e7cc54c6cb20 to your computer and use it in GitHub Desktop.
"use strict";
function CustomCode(Button0) {
if (Button0) {
var startTime = 0;
var getReadyTime = 500;
var goTime = 1500;
var endTime = 2500;
this.sendTo('RGBLED0', [50,0,0], startTime);
this.sendTo('RGBLED0', [50,50,0], getReadyTime);
this.sendTo('Vibrator0', 30, getReadyTime);
this.sendTo('RGBLED0', [0,50,0], goTime);
this.sendTo('Vibrator0', 100, goTime);
this.sendTo('RGBLED0', [0,0,0], endTime);
this.sendTo('Vibrator0', 0, endTime);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment