Here’s a random interesting car fact. The accelerator pedal only controls how much air makes it to the engine; it opens and closes a flap in the air intake called the throttle body. The car has a sensor that records how much air is coming in, the mass airflow sensor, which is just a wire in the airstream. Electrical resistance in metals is proportional to temperature, and the air rushing by cools the wire. The car’s computer is then programmed to inject fuel according to the estimated amount of air coming in, which is double checked with oxygen sensors in the exhaust (which detect uncombusted air, i.e., too little fuel).
Here’s a random interesting car fact. The accelerator pedal only controls how much air makes it to the engine; it opens and closes a flap in the air intake called the throttle body. The car has a sensor that records how much air is coming in, the mass airflow sensor, which is just a wire in the airstream. Electrical resistance in metals is proportional to temperature, and the air rushing by cools the wire. The car’s computer is then programmed to inject fuel according to the estimated amount of air coming in, which is double checked with oxygen sensors in the exhaust (which detect uncombusted air, i.e., too little fuel).
Assuming it is new enough to have a computer. Older cars work by a similar process in the carb.