A battery-operated handheld control transmitter

This is the first transmitter I made using a rotary switch to select the device to be controlled, and whether it is to be turned on or off. The pushbutton only initiates the transmission.
The switch has the diode board under it. The push-button is a keyboard type. The transmitting module is reused from a surplus moisture detector. It is mounted on the other side of the processor board.

This is the bottom.

Here is the circuit diagram. No current flows until the button is pressed, since the negative line is open. During operation the FET is closed by a voltage generated by rectifying a PWM output.

Here is the program code.