Speed of a wheel measurement, light effect and sound effect

Hello

Is there any ideas that I can make changes to my code please. I tried the I2C and Serial communication but still not working.

Any help will be much appreciated

Thank you.