I dont have access to test your code now but what I see that could be wrong is using delay in your code. Delay will stop executing of the code for 100 ms. This is a lot. Search for non blocking delay examplew that uses timers to implement a delay. I guess also that there is a library for that which i saw in one of the examples of mysensors library.