Chapter 2
Programming in Python
IN THIS CHAPTER
Learning the essentials of the Python language
Working with variables and constants
Creating your own function definitions
Working with if logic
Using lists
Looping with for loops
In the preceding chapter, you learn how to create a basic Python program that lights up an LED connected to one of the Raspberry Pi’s digital output ports. Getting the Python programming environment set up correctly is no small accomplishment, so by all means you should congratulate yourself. Well done!
However, you need to know a little more than how to turn on an LED to call yourself a Raspberry Pi programmer. In this chapter, you learn enough Python programming features to perform truly useful things with the circuits you connect to your Raspberry Pi. You learn how to work with basic Python programming features such as variables, function definitions,
Get Electronics All-in-One For Dummies, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.