Skip to content

Instantly share code, notes, and snippets.

@manduks
Last active December 10, 2016 22:59
Show Gist options
  • Save manduks/3fa043cce76f11377ebc06399d3c9879 to your computer and use it in GitHub Desktop.
Save manduks/3fa043cce76f11377ebc06399d3c9879 to your computer and use it in GitHub Desktop.
temperature.on('medir', function () {
led.turnOn();
}, 23);
light.on('medir', function () {
ledRGB1.turnOn('#FF0000');
}, 12);
humidity.on('medir', function () {
ledRGB2.blink('#00FF00');
}, 12);
distance.on('medir', function () {
ledRGB3.blink('#ff0000');
display.blink();
display.setText('vamos a chocar');
}, 23);
potentiometer.on('girar', function () {
servo.rotate('108');
}, 107);
button.on('apretado', function () {
motor.start();
});
//puras acciones
led.turnOn();
ledRGB1.blink('#FF0000');
ledRGB2.turnOn('#00FF00');
ledRGB3.turnOn('#ffffff');
display.blink();
display.setText('hola');
servo.rotate('-118');
motor.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment