liveBook · Manning

Python

As explained in Build Your Own Robot: Using Python, CRICKIT, and Raspberry Pi

Python is a high-level, general-purpose programming language commonly used for automation, data processing, and application development.

Python is the primary software tool for bringing robot capabilities to life. Running on Linux, it combines expressive language features with mature libraries for hardware control, computer vision, QR-code detection, and networked web applications. section 1.0 section 1.3.4

The practical workflow is incremental: configure a Python virtual environment, install libraries, and use Python applications to communicate with hardware through Linux interfaces. This includes controlling CRICKIT components over I2C, timing actions, driving motors, and exposing an interactive robot shell. section 2.2 section 3.0 section 4.4

Python serves several reusable roles in the robot software stack:

  • Communicate with sensors and output devices such as touch inputs and Neopixel LEDs through Adafruit libraries. section 2.2
  • Wrap motor operations in readable functions for forward, backward, turning, and spinning behaviors. section 3.0
  • Provide user-facing control through a Python shell running on Linux. section 4.4
  • Combine software modules and libraries to build functionality beyond robotics projects. section 1.2.2 section 1.3.1

Robot control pipeline

A Raspberry Pi runs Linux and Python; Python uses the Adafruit CRICKIT library to control a Neopixel LED or touch sensor, while motor functions translate commands into physical movement. section 2.2 section 3.0

Figure 2.4 Software stack: this chapter will cover the installation and configuration of Linux and Python.

Use the software-stack diagram to locate Python between Linux and the robot hardware and libraries. section 2.2

How Build Your Own Robot: Using Python, CRICKIT, and Raspberry Pi covers it

How deep it goes
Descends from stack placement and environment setup to hardware interfaces, reusable motor functions, and a Python shell.
Examples
Uses LEDs, touch sensors, motor movement, robot shells, computer vision, QR-code detection, and network control as practical applications.
What it assumes
Assumes a Linux-based robot setup while establishing the software and hardware stack needed for Python applications.
What you can do after
Build it from scratch by configuring Python, installing libraries, and writing applications that operate robot hardware and interfaces.
How it connects
Connects Python with Linux, software libraries, computer vision, QR-code detection, web applications, hardware interfaces, and DC motors.

Also explained in

Compare how 26 books explain Python →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Your Own Robot: Using Python, CRICKIT, and Raspberry Pi. The section links point to the parts of the book it draws on.