This device is made using a micro:bit. The micro:bit detects tilt (using the built-in sensor) and then sends data to the computer. The computer then interprets that data and makes the car turn. I later added an accelerator and brake.
With a light sensor, some tape, a servo motor, a microcontroller and some clever programming, I fully automated the chrome dino game.