Breathing is controlled by the medulla of the brain in response to chemoreceptors detecting changes in H+ and CO2 and O2, as well as baroreceptors detecting changes in blood pressure, and mechanoreceptors in the muscles.