More complex code and audio beeping feedback I did a while ago:
BTW, why don't you show us your combined code, apparently not working? You can get someone's working code that works for now. If you don't find what you did wrong, you will likely make the same mistake in a future project and you can't keep asking for help with combining codes. You eventually find yourself the only one that wants to combine code A with code Z, which nobody did before.