Painful stimuli arising within visceral organs are detected by peripheral nerve endings of spinal afferents, whose cell bodies are located in dorsal root ganglia (DRG). Recent technical advances have made it possible to reliably expose and inject single DRG with neuronal tracers or viruses in vivo. This has facilitated, for the first time, unequivocal identification of different types of spinal afferent endings in visceral organs. These technical advances paved the way for a very exciting series of in vivo experiments where individual DRG are injected to facilitate opsin expression (e.g. Archaerhodopsin). Organ-specific expression of opsins in sensory neurons may be achieved by retrograde viral transduction. This means activity of target-specific populations of sensory neurons, within single DRG, can be modulated by optogenetic photo-stimulation. Using this approach we implanted micro light-emitting diodes (micro-LEDs) adjacent to DRG of interest, thereby allowing focal DRG-specific control of visceral and/or somatic afferents in conscious mice. This is vastly different from broad photo-illumination of peripheral nerve endings, which are dispersed over much larger surface areas across an entire visceral organ; and embedded deep within multiple anatomical layers. Focal DRG photo-stimulation also avoids the potential that wide-field illumination of the periphery could inadvertently activate other closely apposed organs, or co-activate different classes of axons in the same organ (e.g. enteric and spinal afferent endings in the gut). It is now possible to selectively control nociceptive and/or non-nociceptive pathways to specific visceral organs in vivo, using wireless optogenetics and micro-LEDs implanted adjacent to DRG, for targeted photo-stimulation.