Connects and sets up sensor