Working level sensor code