Connect the black wire from the power supply to the white wire of the cable connected to the switch.
How to wire led lights to a wall switch.
Run your cable from the first light to the second light.
If only one switch controls the light purchase a single pole dimmer.
Consequently the switch terminals are identical to those of a regular switch two brass ones for the hot connections and a green ground screw.
Wrap a piece of black electrical tape around each end of this white wire to indicate that it is a hot wire rather than a neutral wire.
How to wire 12v camper lights to a battery.
With a three way dimmer you can control a light with two switches.
Connect the black wire from the switch to the black.
An illuminated wall switch has an internal circuit that provides just enough electricity to power an led in the rocker and this circuit becomes active only when the switch is off.
Although it is indeed possible to wire the lights directly to the positive and negative battery terminals installing a complete electrical system into a diy camper is going to involve moving the branch circuits lights fans usb outlets etc away from the battery bank.
This lets you dim from one location and turn the lights on and off from another.
You will need a three way dimmer and a three way switch.
With a standard single pole dimmer a single switch controls the light.