Program your own Raspberry Pi projects
Create innovative programs and fun games on your tiny yet powerful Raspberry Pi. In this book, electronics guru Simon Monk explains the basics of Raspberry Pi application development, while providing hands-on examples and ready-to-use scripts. See how to set up hardware and software, write and debug applications, create user-friendly interfaces, and control external electronics. Do-it-yourself projects include a hangman game, an LED clock, and a software-controlled roving robot.
- Boot up and configure your Raspberry Pi
- Navigate files, folders, and menus
- Create Python programs using the IDLE editor
- Work with strings, lists, and functions
- Use and write your own libraries, modules, and classes
- Add Web features to your programs
- Develop interactive games with Pygame
- Interface with devices through the GPIO port
- Build a Raspberry Pi Robot and LED Clock
- Build professional-quality GUIs using Tkinter
Table of Contents: Chapter 1. Introduction
What is the Raspberry Pi?
What can you do with a Raspberry Pi?
A Tour of the Raspberry Pi
Setting Up
Booting Up
Summary
Chapter 2. Getting Started
Linux
The Desktop
The Internet
Applications
Internet Resources
Summary
Chapter 3. Python Basics
What is a Programming Language?
IDLE
Numbers
Variables
For Loops
Simulating Dice
If
While
Summary
Chapter 4. Strings, Lists and Dictionaries
String Theory
Lists
Functions
Hangman
Dictionaries
Tuples
Exceptions
Summary of Functions
Summary
Chapter 5. Modules, Classes and Methods
Modules
Object-Orientation
Defining Classes
Inheritance
Summary
Chapter 6. Files and Internet
Files
Pickling
Internet
Summary
Chapter 7. Graphical User Interfaces
Tkinter
Hello World
Temperature Converter
Other GUI Widgets
Dialogs
Menus
The Canvas
Summary
Chapter 8. Games Programming
What is Pygame?
Hello Pygame
A Raspberry Game
Summary
Chapter 9. Interfacing Hardware
GPIO Pin Connections
Direct connection to GPIO Pins
Expansion Boards
Prototyping Boards
Arduino and Pi
Summary
Chapter 10. Prototyping Project (Clock)
What You Need
Hardware Assembly
Software
Phase Two
Summary
Chapter 11. The RaspiRobot
What You Need
Phase 1. A Basic Rover
Hardware Assembly
Phase 2. Adding a Rangefinder and Screen
Summary
Chapter 12. What Next?
Linux Resources
Python Resources
Raspberry Pi Specific Resources
Other Programming Languages
Applications and Projects
Summary