repeater node with sensor

can i combine a repeater node with sensor together?
i want to cover a large area with sensors and i need some thep/humid sensors on the way so i thought it could be nice to use the same node for the two missions.
to avoid sleep time for the repeater, and continous sampling time from the sensor, i manged to copy a function from sparkfun flow sensor sketch to calculate milliiseconds between readings (there it was 1000 ms and i want it to be 600000 ms (every 10 min))

is it possibe? also, what sketch to delcare on setup? humidity or repeater?

You sure can. I made early on a MotionSensorRepeater using 1.5.0 . The gotcha is you need to implement some sort of NON_BLOCKING rate limiting so the sensor doesn't spam the repeater. If you use DELAY(), you will lose messages. A lot of them.

Also, I'm using a junky Sparkfun PIR sensor for this, with NO potentiometers for sensitivity or triggered duration, so I had to do duration in software. That's why the extra complication.

its just the regular humidity sensor with gw.begin in repeater mode and gw.process in the end(with no sleep time) and the "anti-spam" is the if((millis() - oldtime) > 600000) statement so i still have reading every 10 minutes.

is that ok or the dht22 delay can interfere with the repeater operation?
also, the send.sketchc should be "repeater" or "humidity"?

about this delay - delay(dht.getMinimumSamplingPeriod());
it comes with the humidity sensor sketch and i thought it is crucial for the sensor to work.
did you meant replace this line with the gw.wait?
maybe i can delete it anyway because the whole loop doesnt perform until 10 minutes passed.

Looking at the code, there's no good reason to use that delay at all. You're already waiting for 600 seconds with the

if((millis() - oldTime) > 600000)

loop. The Delay is only recommended in the main codebase so that the sensor has time to regenerate the data. Some sensors have to wait for a bit or the measurement will be off, but we're talking about milliseconds here.

Just delete the whole line:

delay(dht.getMinimumSamplingPeriod());

and you should be perfectly fine. If you wanted to be on the safe side, you could do the following...