Conventional peripheral neurostimulators are used to treat a variety of musculoskeletal and neurological conditions. Typically, they send an electrical pulse to activate individual nerve fibers by placing a small metal electrode directly adjacent to the desired nerve or nerve fiber subset. Instead of this, we use optogenetics (light-sensitive proteins from algae) to target unique nerve subsets. First, we identify and characterize these proteins that are uniquely sensitive to different wavelengths of light, and second, we alternate blue and red light to control distinct movements transdermally. What is unique is that this technique is independent of the position of the source—that is, we can switch the position of the red and blue lights and they still activate the same peripheral nerve fiber subsets! Now, we can control precise motor and sensory behaviors within the same peripheral nerve by switching the color of light in the room.