Camshafts are basically used in the internal combustion engine for timing he intake and the exhaust valve opening. So if your question is about an all electric car like a Tesla then there wouldn't be a camshaft (in the engine). It's an electric motor that powers the car entirely. read more
Before the advent of solid state electronics, camshaft controllers were used to control the speed of electric motors. A camshaft, driven by an electric motor or a pneumatic motor, was used to operate contactors in sequence. read more