We investigated the relationship between whisker mechanoreceptive inputs and the neural responses to optical stimulation in layer 2/upper 3 (L2/U3) of the barrel cortex using optogenetics since, ideally, we should investigate interactions among inputs with spatiotemporal acuity. Sixteen whisker points of a transgenic rat (W-TChR2V4), that expresses channelrhodopsin 2 (ChR2)-Venus conjugate (ChR2V) in the peripheral nerve endings surrounding the whisker follicles, were respectively connected one-by-one with 16 LED-coupled optical fibres, which illuminated the targets according to a certain pattern in order to evaluate interactions among the inputs in L2/U3. We found that the individual L2/U3 neurons frequently received excitatory inputs from multiple whiskers that were arrayed in a row. Although the interactions among major afferent inputs (MAIs) were negligible, negative interactions with the surrounding inputs suggest that the afferent inputs were integrated in the cortical networks to enhance the contrast of an array to its surroundings. With its simplicity, reproducibility and spatiotemporal acuity, the optogenetic approach would provide an alternative way to understand the principles of afferent integration in the cortex and should complement knowledge obtained by experiments using more natural stimulations.