add sensor initialize function