Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<meta name="description" content="Blinkenlights" />
<html>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
  <script src="http://blinken.eecs.umich.edu/client.js"></script>
<body></body>
</html>
 
// View output to see simulator.
// Drag the model to rotate (requires Chrome or Firefox).
// Open your JavaScript console to view errors.
(new Blinken({title: "Pickles", 
              author: "lola"})).run(function () {
    // My self-contained program goes here.    
    var x = 0;
    var d = 1;
    var n = 10;
    // Update lights one frame
    return function (lights) {
        for (i = 0; i < lights.length; i++) {
          lights[i].rgb(0.25, 0, 1)
        }
        for (i = 0; i < 5; i = i+1) {
             lights[Math.floor(Math.random()*100)].rgb(1, 0.75, 1)
        }
        return 225; // ms until called again
    };
});
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers