You can use your old Android phone as a webcamera for your desktop or laptop computer. SmartCam is an awesome Android app that lets you turn your Android phone into a webcam that can used on your PC.
It makes your Android device works as a wireless webcamera over Wifi or on Bluetooth. To start using it, you should have SmartCam app installed on your Android device and its PC application on your computer system (Both Windows and Linux versions are freely available here).
Now set the connection over WiFi or Bluetooth (whatever you find easy and available). It works perfectly as a webcamera and can also be used for Skype & Google Hangouts etc.
It also allows you to set video resolution and disable screen from going to sleep mode.