The back-to-back recalls of Toyota cars and trucks for problems related to the accelerator pedals offer a textbook example of how major safety issues can arise from matters both simple and complex.

The recall last week of 2.3 million Toyotas for sticking gas pedals brought on Tuesday’s announcement that sales and production of eight Toyota models would be stopped — demonstrating the complexities of cars. (This recall is unrelated to an earlier problem, the recall of 4.2 million Toyota and Lexus vehicles for gas pedals hanging up on floor mats. And late Wednesday, Toyota added 1.1 million vehicles to that recall.)

Some 2.35 million vehicles are subject to both recalls, Toyota said Thursday.

In a filing with the National Highway Traffic Safety Administration, Toyota said the latest problem was in the pedal sensors of affected vehicles. When the heater is turned on in a car that is cold, internal water condensation on the cold parts can cause a sliding component inside the gas pedal assembly to stick instead of move smoothly. The defect may cause the throttle to stick in an open position or to move stiffly during opening and closing, requiring more pedal pressure.

The pedal sensor is part of a so-called drive-by-wire throttle system, in which the gas pedal has no direct connection to the engine through a cable or mechanical linkage. A sticking pedal in an older car with a cable or mechanical link would typically be solved with a squirt of oil or dab of grease, a straightforward task for a handy car owner.

But in today’s cars, the connection between the pedal and the engine is made by electrical signals traveling through wires. The pedal sensor gauges how far the driver is pressing the gas pedal and signals the engine’s control computer, which determines how much to open the throttle based on input from a variety of sensors, choosing a setting that will achieve the lowest exhaust emissions, the best fuel efficiency and good engine response.

The accelerator pedal recall last year was caused by mechanical interference, according to Toyota — a matter of the gas pedal getting trapped by an out-of-place floor mat. The solution to that problem will include modification of the gas pedal and replacement of floor mats. For some models, the fix will include a reshaping of the car’s floor and the installation of an override system to cut engine power if the accelerator and brake pedals are pressed at the same time.