The code you posted (correctly; thank you for that) does something, but you didn't say what it actually does. You expect each sketch to do something, but it isn't clear what you expect it to do.
Well... I was excepting that the monitor will show the wind speed [meters per second] and revolutions every 5 seconds.But the result shown in the monitor is zero.
There is a switch inside the wind vane. So, every time the vane spins (due to wind blow), it will click on and off the switch. Therefore, I use attachInterrupt() function.
It should be gathering the revolution every 5 seconds, then multiple 2401.1 [m/(hr*revolt)].
And lastly, average it (divide 5 ) to get the average wind speed [m/hr].
There's also a switch inside the rain gauge. It counts how many time it flips on/off (implies how many rain drops), and then calculate the average rainfall during 5 seconds [mm/sec].
I printed the revolution just to make sure the program works, but it didn't.
I made 3 attempts, all of them using attachInterrupt function.
Two with different code for wind speed. And one for rain gauge.
But the result shown in the monitor is zero.
I'm not sure whether there's a false code line inside the program or something else.
The program is a little... huge... So, I'm now trying to dividing into small pieces and use a button switch to test the program again.