I have some battery powered LED lights to go in a cupboard; and I have a 5-terminal magnetic alarm sensor to turn them on when the cupboard door opens.
The problem is that the lights turn on when the sensors are close together (i.e. the door is closed) and off when they're apart. I've tried hooking up the sensor the opposite way around, and I've tried attaching it to both cables out of the battery pack, but it's always the same.
What's the easiest way to reverse this?