• Hmm - it's a bit tricky to debug stuff like this.

    Could you try - once you're connected via Bluetooth - typing load() on the left-hand side? This will have more or less the same effect as a power-on reset, so you should be able to see if there are any errors or anything written to the console. Failing that, you could try blinking LEDs to give you some idea of the status of your code.

    Had a green light, then switch to the red light each time.

    And it just stays on red? It should go:

    • Green (3 sec)
    • Brighter green (0.5 sec)
    • All LEDs on
    • 1 sec
    • Red flashing 5 times

    Is it possible that you downloaded and flashed the wrong firmware package? Like the Pixl rather than Puck, or something like that? Maybe you could try re-downloading, especially as there is a 2v01 firmware now.

    As for the PIR and Microwave sensors, I've tried common ground initially

    Could you post up a quick sketch of your circuit?

    You could try uploading just:

    setInterval(function() {
      LED.write(pin.read());
    }, 10);
    

    And see what happens?

    It's possible that some sensors only provide a pullup(or pull down) on a signal and are open circuit the rest of the time. In that case you'd need to turn on the Puck's internal pullup resistors with pinMode(pin, "input_pullup") (or input_pulldown).

    The other potential issue is if you're using (for instance) a 5v circuit for the sensor then it might be outputting 5v signals directly into the Puck, which would cause all kinds of havoc (it's only designed for 3.3v level signals).

About

Avatar for Gordon @Gordon started