ABSTRACT

In this chapter, the authors connect Pyo to the physical world by connecting various sensors to the computer and getting their data into Python and Pyo. For many scenarios, using MIDI controllers can be sufficient for controlling various parameters, but being able to use any sensor the people want in Python scripts, provides another level of flexibility and freedom. Physical Computing is a term that encompasses various Human-Computer Interaction (HCI) practices through the use of sensors that convert analogue signals to digital, transferring information from the physical world to the computer, and vice versa. The standard way to connect the Arduino to the computer is to program the former in its language and connect the program running on the computer to communicate with the USB port the Arduino physically connects to. Bytes received from the serial line with pySerial are returned in the form of the bytes Python data type.