For years the world has been abuzz with IoT devices. These devices range from alarm clocks that show the current weather to refrigerators that list the prices of nearby groceries. Whatever the specifics, these devices rely on APIs to communicate with data sources. But how, exactly, do we connect the messages, data, and devices?
In this post, we’ll show you an example of how to design and model data for an IoT device. We’ll use the M5Stack—a small, modular IoT device with a display screen—and connect to the API for the New York City Metropolitan Transportation Authority (NYC MTA) to render the latest subway times for various stations.
While we’ll focus on the M5Stack, the concepts we’ll discuss will apply to designing an IoT application across a wide variety of devices.