Speed detection with nrf24L01 modules

Count your braces { } I didn't print it out and mark each but it looks like your

if (radio.available()) {

close brace is at the end of the code.