improve API for sensor setup
define api for setting up sensor