How to code a three mode robot?


I’m currently struggling with coding a three mode robot. How do you do this?

The robot would just stay in mode 1 no matter what I do.

Please help! Any advice would be greatly appreciated!



Here are screenshots of the code


mBot cannot multitask.
See more about this type of issue here:

If you need more help, mention me as @Best_codes, and I will make a code for you if I find time.

Thanks for your time,