User Guide

5.4 Collision Detection 111
5.5 Enemies 117
5.6 More Enemies 129
5.7 Game Over 130
6 – Programming in Python 131
6.1 Your First Python Program 131
6.2 Python 133
6.3 Decisions 138
6.4 Loops 140
6.5 Functions 141
6.6 Classes and Objects 144
6.7 Modules and Packages 148
6.8 File I/O 150
6.9 Graphical User Interfaces (GUIs) 153
7 – Controlling Input and Output Pins 154
7.1 Electronic Circuits, Voltage and Current 154
7.2 Solderless Breadboards 156
7.3 The GPIO Header 157
7.4 Basic Output 159
7.5 Basic Input 164
7.6 Communication between 3.3 V and 5 V Devices 168
7.7 Serial Peripheral Interface (SPI) 170
7.8 I2C Communication 176
7.9 Serial UARTs 179
8 – Building an IP Camera 182
8.1 The Pi Camera Module 182
8.2 Motion 184
9 – Building a Smarter Doorbell 190
9.1 The Button Circuit 190
9.2 Speakers 192
9.3 A Basic Doorbell 192
9.4 An Enhanced Doorbell 195
10 – Making Free Phone Calls with Google Voice 197
10.1 SIP and Softphones 197
10.2 Google Voice 199
10.3 RasPBX 200
10.4 SIP Phones across the Internet 206
11 – Accessories 207