Home
Projects
Blog
Puck WebBLE Test Page
Click me 1!
RED
GREEN
BLUE
OFF
Write your own code!
// This example code just cycles the LEDs. // NOTE: Hit reset to reset! var ledCyclePosition = 0; function cycleLEDs() { var lastCyclePos = ledCyclePosition; ledCyclePosition++; if (ledCyclePosition > 2) { ledCyclePosition = 0; } var leds = [LED1, LED2, LED3]; leds[ledCyclePosition].write(1); leds[lastCyclePos].write(0); } var interval = setInterval(cycleLEDs, 500);
Send to puck
Reset
Log a warning
Find out more of what you can do at
www.puck-js.com/go
Copyright 2018 David Park