share a toggle switch between two devices

how could I share (connect) a toggle switch between two devices , first device is fed up with battery 9V an second one with 12 v , I want to the connect the two devices with one switch , so when I run the switch ON the two devices should run or power together at the same time.

thanks

Connect battery- from both batteries to one pin, and the other pin to Gnd on both boards.

CrossRoads:
Connect battery- from both batteries to one pin, and the other pin to Gnd on both boards.

Thanks a lot , actually I don’t understand, What is the place of switch in that ? I prefer if there is any sketch for that.

Like so.

CrossRoads: Like so.

Couldn't that cause some current leakage because one voltage is higher than the other and both are connected to electronics that presumably share a Ground? I would play it safe and use a Double Pole switch to switch the positive side of the two voltages separately. Or run the Arduino on the same 9V supply used by the motor driver. Since any voltage between 7 and 12 will work on the Arduino and the power dissipated in the regulator is higher for higher voltages 9V makes more sense than 12V.