If you check the list of senors that even a basic smartphone has in the manual you will be surprised to see a long list. Ambient light senor, Gyroscope, Magnatometer, GPS, Sound noise level, Gravity etc are very common even in the cheapest smartphones. If you have a old smartphone, which you may not be using for some other issues, can stil have all the sensors working properly. You can stream the senor data to another computer or cloud, which you can process and possibly perform some actions.

I used an app called Sensor Node where you can mention the IOT server address and Topic name where the phone's sensor data should be streamed to.

Finally the following web utility (thanks to https://github.com/matbor ) can be used to visualise the data in real time.