Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Throughout this book, we’ve explored data and different conceptions of what data is and how it is understood in an application. A user gets data from an application that helps them understand what the application is doing, how their actions have been interpreted, and how to get the application to do what they want it to do. This data is called the feedback. The data that the user sends to the application is called the input. The input tells the application what the user wants it to do, how it should do it, and what kind of feedback to provide. In this chapter, we’ll focus on a different sort of exchange of data: exchanging data between an application and devices. This isn’t new; you’ve already looked at many different components that work with the Arduino controller: receiving commands from the Arduino, sending data to the Arduino, using your computer in tandem with the Arduino, and creating an exchange of information and commands between the two of them. What you haven’t looked at yet are the ways that communication between different machines and applications depends on the context, the means of communication, the machines used, and the amount of data being exchanged.
Cell phones, communication over the Internet, and devices plugged into your computer all rely on protocols that dictate how devices communicate with one another. Enabling your devices to communicate with other devices is really a matter of ensuring that your system knows the protocol that the other devices speak. Think of it like a conversation between two people: they have to be speaking the same language to know what the other one is talking about. Without those protocols established, a conversation can’t occur, and your application and the devices it needs to communicate with need the same kinds of protocols. There needs to be an understanding of what is being communicated and how that communication is being encoded.