You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi,

    I'm going to include a small (business-card sized) piece of paper with each of the Espruino Picos. It's got a QR code, link to the Quick Start, and the Pinout on it.

    However there's a small bit of space down the side, and I thought it'd be worth having a 'cheat sheet'/'Quick Reference' on it... So what do you think should be in there?

    It is quite small (1/3 of a business card) - so it needs to be simple.

    Thoughts so far are:

    // Light LED1
    digitalWrite(LED1, 1);
    // Blink LED2 for 150ms
    digitalPulse(LED2, 1 /*polarity */, 150);
    // Turn LED1 off after 1 sec
    setTimeout(function() {
      digitalWrite(LED1, 0);
    }, 1000 /* millisecs */);
    // 40% duty cycle, 300Hz square wave
    analogWrite(A8, 0.4, {freq:300});
    // Internal pullup, read value
    pinMode(B15, "input_pullup");
    console.log(digitalRead(B15));
    // Read analog value every 100ms, light LED1
    setInterval(function() {
      var a = analogRead(A5);
      digitalWrite(LED1, a>0.5);
    }, 100);
    // When button is pressed
    setWatch(function(e) {
      console.log("Press at "+e.time);
    }, BTN, { repeat: true, edge: "rising", debounce: 50 });
    
    
About

Avatar for Gordon @Gordon started