It's a waste to throw away an old phone. On the used market, you might still get something for it. But you can also give your device a second life as a dashcam. Video from your car can come in handy, for example as evidence after an accident.
First, make sure your old phone is as empty as possible so it doesn't use as much power and doesn't overheat. You can even reset it to factory settings. After all, you only need the camera.
Special camera apps for your smartphone
To use your phone as a dashcam, you need a special app. On Android phones, you can choose the app AutoBoy. You can set a maximum size for storage. When it is full, the app automatically deletes the oldest video. Another good choice is DailyRoads Voyager. You can quickly save videos by tapping the screen. The app is free, but it does show ads. Both apps you can also run in the background. Then you can also use the navigation on your smartphone, while the camera just keeps recording.
iPhone owners can check out the popular app Nexar AI. This free app can recognize important moments by itself thanks to machine learning techniques. For that, however, you often have to endure annoying commercials. Moreover, the app takes a heavy toll on your battery. You can also opt for the simpler app Smart Dash Cam. It offers many options to customize the video recordings, such as sound or no sound. You can also store the footage in the cloud.
Besides the above examples, there are many more dashcam apps. If you search for "dashcam" in the app store, you'll find plenty of options.
Test drive the dashcam
Before using the app, try it out first. For example, take a test drive and see if your camera captures everything well. Make sure you have a good stand, in a place where it doesn't obstruct your view. In any case, it is important not to tinker with the settings while driving.