Raspberry_Pi_Education_Manual

Human-computer interfacing Chapter 4

Notes:

Hear the word “ computer ” and you probably think of a box with a monitor attached, like a desktop PC. But these days, almost every electronic device, from your TV or your parents’ satnav, right up to the auto-pilot in a jumbo jet, is controlled by a computer. Computers are everywhere. In order to do the job they’re programmed for, computers need to receive information from the real world telling them what to do; these are called “ inputs ”. An input could be a user typing a command or clicking on something with the mouse, or it could be readings from the sensors on an aeroplane wing, telling the auto-pilot the wind speed, air pressure and compass location of the plane. It all depends on the type of computer and the type of program.

To function, computers need inputs – information from an external source. They process this information and produce a result, called an “output”.

Fun with ports

Inputs and outputs could also come in the form of a data connection, such as a network link to the internet. Think of the internet, and you probably think of web pages. In fact, the World Wide Web is only one of the many internet applications. There are lots of other ways to use the internet, such as email, instant messaging, text-based newsgroups or logging on to another computer using the Secure Shell (SSH) network protocol. Each of these different ways of using the internet has a port number associated with it. By “ port ”, I don’t mean an actual physical connection on your computer, such as a USB or FireWire port. In this context, a port is a software connection. A port can either be open or closed. If it’s open, then that simply means that the program will accept connections over it. If the port is closed, then the program won’t accept connections and the service in question won’t accept any inputs over the network. For instance, the HTTP protocol used by the World Wide Web accepts inputs using the TCP port 80. If port 80 is open, a web server will respond to a request from a client, such as your web browser, by displaying the requested web page. If one of that server’s administrators has closed port 80, then you won’t be able to access the website and your browser will display an error message.

Human-computer interfacing

113

Made with FlippingBook flipbook maker