adding sample code for ECsensor