Starting with the feeder wire, locate the black wire and pigtail it to the black wire going to the outlet and also the bottom brass-colored screw on the switch.
Connect the red wire to the top brass-colored screw on the switch. This connection is what will turn on and off one part of the outlet.
Twist the white wires together and twist a wire nut over them.
Twist the ground wires together and pigtail them to the box and to the green screw on the switch.



