You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi. I think your problem is that when you run setWatch, the pin state is changed to an input. Try manually specifying it by replacing:

      C2.write(0);
      C3.write(0);
      C4.write(0);
      C5.write(0);
    

    with:

      pinMode(C2, "input_pulldown");
      pinMode(C3, "input_pulldown");
      pinMode(C4, "input_pulldown");
      pinMode(C5, "input_pulldown");
    

    Your other problem (which isn't good for Espruino) is that when you press the button, you're applying 5v (from VBat) to 3.3v only pins. See http://www.espruino.com/ReferenceESPRUINOBOARD - the pins that can't take 5v are marked with 3.3.

    I'd suggest that instead of connecting the other side of the buttons to VBat, you connect it to 3.3

    Hope that helps!

About

Avatar for Gordon @Gordon started