The One with the Hardware Handshakes
Hardware interaction and control
As system programmers, we never deal with users. We deal with other software. That other software could be on the same machine, or it could be on another machine. And sometimes, we deal with hardware. That hardware could be part of our machine, hardware attached to our machine, or hardware somewhere else.
In this chapter, we will look into all of these options. We will look at interacting with hardware directly and connecting to remote devices, and we will dive deep into the world of serial communications.
In this chapter, we’re going to cover the following main topics:
- Connecting to a serial port on Windows.
- Setting up an Arduino device
- Programming a simple program on an Arduino
- Getting data from a serial port
- Handling events from the outside
- Debugging code depending on external devices
- Make this sort of code as reliable as possible
- All in all, we have much ground...