turn diodes on/off