2 options
Getting started with Python and Raspberry Pi : learn to design and implement reliable Python applications on Raspberry Pi, using a range of external libraries, the Raspberry Pi's GPIO port, and the camera module / Dan Nixon.
- Format:
- Book
- Author/Creator:
- Nixon, Dan, author.
- Series:
- Community experience distilled.
- Community experience distilled
- Language:
- English
- Subjects (All):
- Python (Computer program language).
- Computer programming.
- Raspberry Pi (Computer).
- Raspberry Pi (Computer)--Programming.
- Physical Description:
- 1 online resource (201 p.)
- Place of Publication:
- Birmingham : Packt Publishing, 2015.
- Language Note:
- English
- Biography/History:
- Nixon Dan: Dan Nixon is a software and electronics engineer living in the north of England. He has past experience of creating software for data analysis, process control, and business intelligence applications. In most of these projects, Python was one of the main languages used. Dan previously authored another book on the uses of the Raspberry Pi, called Raspberry Pi Blueprints, and has worked on many personal projects that use both Python and the Raspberry Pi.
- Summary:
- Learn to design and implement reliable Python applications on the Raspberry Pi using a range of external libraries, the Raspberry Pis GPIO port, and the camera module About This Book Learn the fundamentals of Python scripting and application programming Design user-friendly command-line and graphical user interfaces A step-by-step guide to learning Python programming with the Pi Who This Book Is For This book is designed for those who are unfamiliar with the art of Python development and want to get to know their way round the language and the many additional libraries that allow you to get a full application up and running in no time. What You Will Learn Fundamentals of Python applications Designing applications for multi-threading Interacting with electronics and physical devices Debugging applications when they go wrong Packaging and installing Python modules User interface design using Qt Building easy to use command-line interfaces Connecting applications to the Internet In Detail The Raspberry Pi is one of the smallest and most affordable single board computers that has taken over the world of hobby electronics and programming, and the Python programming language makes this the perfect platform to start coding with. The book will start with a brief introduction to Raspberry Pi and Python. We will direct you to the official documentation that helps you set up your Raspberry Pi with the necessary equipment such as the monitor, keyboard, mouse, power supply, and so on. It will then dive right into the basics of Python programming. Later, it will focus on other Python tasks, for instance, interfacing with hardware, GUI programming, and more. Once you get well versed with the basic programming, the book will then teach you to develop Python/Raspberry Pi applications. By the end of this book, you will be able to develop Raspberry Pi applications with Python and will have good understanding of Python programming for Raspberry Pi. Style and approach An easy-to-follow introduction to Python scripting and application development through clear conceptual explanations backed up by real-world examples on the Raspberry Pi."
- Contents:
- Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Your First Steps with Python on the Pi; Installing and setting up Raspbian; Writing to the SD card; Windows; Linux and Mac; Booting the Pi for the first time; The Python development tools; Python 2 versus Python 3; Running some simple Python scripts; Summary; Chapter 2: Understanding Control Flow and Data Types; Data in Python; Numerical types; Operations on numerical types; String manipulation; String functions; String formatting; String templates
- Control flow operatorsUsing functions; Summary; Chapter 3: Working with Data Structures and I/O; Data structures; Lists; Creating lists; List operations; Dictionaries; Creating dictionaries; Dictionary operations; Sets; Set operations; Frozen sets; Tuples; Input/output; The os.path module; Reading and writing files; Summary; Chapter 4: Understanding Object-oriented Programming and Threading; Object-oriented programming; Classes in Python; Operation.py; Calculator.py; Using the module; Inheritance; Threading; Locks; Summary; Chapter 5: Packaging Code with setuptools
- Using packages in your Python codeImporting modules; Installing modules manually; Installing modules using pip; Installing modules using apt; Packaging your own Python modules; Packaging a library; Adding an entry point; Summary; Chapter 6: Accessing the GPIO pins; Digital electronics; The GPIO library; Single LED output; PWM output; Multiple outputs; Basic switch; Switch using interrupt; Universal Asynchronous Receiver/Transmitter (UART); Setting up the serial port; Using pySerial; Additional libraries; Summary; Chapter 7: Using the Camera Module; Setting up the camera module
- Installing and testing the Python libraryWriting applications for the camera; A time lapse recorder; A point-and-shoot camera; An image effect randomizer; Summary; Chapter 8: Extracting Data from the Internet; Using urllib2 to download data; Parsing JSON APIs; Parsing XML APIs; The DOM method; The SAX method; Parsing a web page using BeautifulSoup; Summary; Chapter 9: Creating Command-line Interfaces; Unit conversion application; Command-line interface; Summary; Chapter 10: Debugging Applications with PDB and Log Files; The Python debugger; Writing log files; Unit testing; Summary
- Chapter 11: Designing Your GUI with QtSetting up the codebase; Building the UI with Qt Designer; Writing the UI code; Launching the UI; Packaging the code; Summary; Index
- Notes:
- Includes index.
- Description based on online resource; title from PDF title page (ebrary, viewed January 6, 2016).
- ISBN:
- 9781785285837
- 1785285831
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.