During the process of building the Twitter project, you may be baffled by some unexpected behavior of your program. It is easy to debug these anomalies if you understand some basics of how the operating system/firmware works. This knowledge will also help you effectively use the programming language and library features to write perfectly working code.
In Essential terminology, Chapter 1, Introducing IoT with Particle Photon and Electron, we briefly mentioned that RTOS responds to events in real time, and is used in embedded systems. Real-time responses, along with its small memory and energy footprint, has made FreeRTOS a very popular choice for many other embedded chips as well. One of the major improvements in the Photon is that using FreeRTOS, the system code and application code now run in separate threads without compromising the efficiency of real-time responses. The user's application code is usually very small (a few KBs), but the system...