Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>Canzasi Blink</title>
  <script src="https://r.chirimen.org/polyfill.js"></script>
  <script src="https://r.chirimen.org/xxxxx"></script>
</head>
<body>
  <p>Canzasi Prot with example simple LED Device</p>
  <p id="head">TEST</p>
</body>
</html>
 
// noprotect
window.addEventListener(
  "load",
  function() {
    var head = document.getElementById("head");
    navigator
      .requestI2CAccess()
      .then(i2cAccess => {
        var port = i2cAccess.ports.get(1);
        var cz = new canzasi(port, 0x30);
        var v = 0;
        cz.init().then(function() {
          setInterval(function() {
            v ^= 1;
            cz.set(v);
          }, 500);
        });
      })
      .catch(e => console.error("error", e));
  },
  false
);
Console
    Output

    You can jump to the latest bin by adding /latest to your URL

    Dismiss x
    public
    Bin info
    dynamispro
    0viewers