hold last sensor value

    delay(30);

So, you DID mean periodically? You swore up and down you didn't.