wait for response for x time, send a message by x time, or when response receive

timestamp = now
Repeat
{
  if message received or (millis - timestamp)>interval
  {
     send message
  }
}

Yes, like that. I would add a "break;" after sending the message so the Repeat loop doesn't continue forever. :slight_smile: