Need help to combine two different task using LED matrix

The code you posted for both tasks is incomplete.

Post your attempt to combine them and explain what the problems are.