Skip to main content
Chemistry LibreTexts

1: Computer Interfaces

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    You could say a computer interfaces represent how a computer  interacts and communicates with an external entity. That entity may be a human, or some other electronic machine. In this course we are using two types of Human Computer Interfaces (HCI); the Command-Line Interface (CLI) and the Graphical User Interface (GUI). Other human to computer Interfaces include Touchscreen Interface, Voice User Interface (VUI), Virtual Reality Interface (VRI) and Augmented Reality Interface (ARI). An interface between two machines is an Application Program Interface (API), which involves software communicating between two different devices, and these are extensively used in the Internet of Things.

    Common HCI

    The only Human Computer Interface we are using in this class are the CLI and GUI, as those are the two interfaces you are using in this class to communicate with the Raspberry Pi. 


    The terminal where you type Linux commands is the CLI of the Raspberry Pi. This allows you to interact with the operating system and is keyboard driven.


    The desktop of the normal Raspberry Pi OS installation if a GUI that you can navigate by mouse or other pointer device. This allows you to use Interactive Development Environments (IDE) like Thonny, which can assist with programming and troubleshooting. Most people today communicate with computers through GUIs.


    The Application Program Interface (API) is critical to the internet of things and we will quickly review them as few students will be familiar with APIs. Many of these you use without even thinking about it, but they are fundamental to the processes being run by a computer and it is important you recognize that.

    Hardware APIs

    These allow software to interact with input and output data and involve ports that you can connect devices to. This includes printers, speakers, microphones, sensors and actuators. These require hardware interfaces or ports such as USB, hdmi, the Raspberry Pi 40 pin GPIO pins or even Bluetooth wireless communication technology to enable communication with the device.  The hardware API acts as an access point to allow programmers to use communication protocols to communicate with devices .

    Web APIs

    Web APIs allow you to communicate between computers across the web. For example, a web page has a URL (Universal resource Locator) which is the unique address the server uses to provide the page you are reading.  A URI (Universal Resource Identifier) is like a URL for a specific piece of data accessible over the web.

    When we learned how to concatenate strings byu communicating with PubChem to get a molar mass of a molecule we were using the PUG (Power User Gateway) REST (Representational State Transfer) API provided by NIH NCBI to programmatically access chemical data within the PubChem database.

    Operating System APIs

    Linux is the operating system of a Raspberry Pi and it serves as the interface between you and your computer's hardware. This allows you to manage resources like memory, processor time and input/output operations. This is not really a programming language like Python, although you can use BASH (Bourne-Again SHell) scripts to automate repetitive tasks in Linux systems

    Database APIs

    These are application program interfaces that allow computers to interact with databases

    Library APIs

    The import statement in Python is an example of the use of a Library API, where you are taking code in one program and using it in another. That is, two programs are communicating with each other.  In Python Libraries are collections of modules that contain variables, functions and classes that can easily be used by other programs through a library API.


    This page titled 1: Computer Interfaces is shared under a not declared license and was authored, remixed, and/or curated by Robert Belford.

    • Was this article helpful?