• pinMode info is here: http://www.espruino.com/Reference#l__glo­bal_pinMode

    input_pullup adds a resistor inside the chip, pulling the LDR pin towards 3v. If you keep that on when the LED is on then it's going to suck up lots of power - hence the reason for just setting to an input to turn it off

About

Avatar for Gordon @Gordon started