High-density electrophysiology devices allow neuroscientists to observe spikes from large populations of neurons, and optogenetics allows them to drive or suppress those spikes. We show that a single device can combine these two capabilities, providing a high-resolution means to both read and write neural activity in the living brain.