Add code at sensor