One of the concepts many people find challenging when learning and beginning to writing code for microcontroller applications is: how to manage multiple hardware-related tasks, seemingly all running at the same time. Notably, events that should trigger some corresponding (re)action can occur at any time and in any order. It would be wonderful to write separate bits of code for each event type and (re) action, and then have the microcontroller run them as multiple separate threads of execution. Unfortunately, microcontrollers (such as the Arduino's ATmega328P chip) are really micro and don't have the hardware resources (such as our laptop computers) to execute a real operating system that support multiple processes and simultaneous threads of execution.  This tutorial will explain the danger associated with using "delay()" in code for time-based actions, and take you incrementally through a few code examples to introduce a very simple framework for managing multiple asynchronous tasks/services. While the framework is pretty informal, it should give you good preparation for coding your pBot designs. If you are interested, there are more structured and sophisticated ways to deal with multiple tasks. Feel free to ask the TTeam or explore on your own.  Let's start by reviewing the code for the blinking LED -- the program that is initialized on your RBBB that you've built. This very simple program demonstrates the basic concepts of time-based events and actions. Just about everything we do in the microcontroller world has some elements of timing involved. Then, we'll explain one of the major potential gotchas in this program, how to avoid such pitfalls, and how to better manage time-based activities.