I've got a run of cable in my house (probably only 2 metres) that I'm running at 3.3v from a switch, and even that does pick up some interference.
I'd definitely say to use twisted pair or coaxial cable (so not straight like speaker wire). It might be worth looking at using an 'optoisolator'. They're dead simple - basically a LED and light sensor in one tiny chip, and they cut out interference that you might get from the wire by converting the signal to light first.
Maybe use one of those, with 12v signals down the wire, going into the optoisolator via a suitable resistor (and maybe a 0.1uF capacitor across the optoisolator just to help with interference). On the other side of the optoisolator you can just go right into Espruino, and use the 'input_pullup' pin mode to take advantage of Espruino's built-in resistor.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I've got a run of cable in my house (probably only 2 metres) that I'm running at 3.3v from a switch, and even that does pick up some interference.
I'd definitely say to use twisted pair or coaxial cable (so not straight like speaker wire). It might be worth looking at using an 'optoisolator'. They're dead simple - basically a LED and light sensor in one tiny chip, and they cut out interference that you might get from the wire by converting the signal to light first.
Maybe use one of those, with 12v signals down the wire, going into the optoisolator via a suitable resistor (and maybe a 0.1uF capacitor across the optoisolator just to help with interference). On the other side of the optoisolator you can just go right into Espruino, and use the 'input_pullup' pin mode to take advantage of Espruino's built-in resistor.