Complementary action of chemical and electrical synapses to perception