GithubHelp home page GithubHelp logo

lulzzz / python-programming-with-raspberry-pi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from packtpublishing/python-programming-with-raspberry-pi

0.0 2.0 0.0 534 KB

Code repository for Python Programming with Raspberry Pi Zero, published by Packt

License: MIT License

CSS 0.64% HTML 7.07% Python 91.75% Shell 0.54%

python-programming-with-raspberry-pi's Introduction

Python Programming with Raspberry Pi

This is the code repository for Python Programming with Raspberry Pi, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.

About the Book

Raspberry Pi Zero is a super-small and super-affordable product from Raspberry Pi that is packed with a plethora of features and has grabbed the notice of programmers, especially those who use Python.

This step-by-step guide will get you developing practical applications in Python using a Raspberry Pi Zero. It will become a valuable resource as you learn the essential details of interfacing sensors and actuators to a Raspberry Pi, as well as acquiring and displaying data.

You will get started by writing a Python program that blinks an LED at 1-second intervals. Then you will learn to write simple logic to execute tasks based upon sensor data (for example, to control a motor) and retrieve data from the web (such as to check e-mails to provide a visual alert). Finally, you will learn to build a home automation system with Python where different appliances are controlled using the Raspberry Pi.

The examples discussed in each chapter of this book culminate in a project that help improve the quality of people’s lives.

Instructions and Navigations

All of the code is organized into folders. Each folder starts with a number followed by the application name. For example, Chapter5

The code will look like the following:

      static int ngpios;

      static int gpios[2] = { -1 , -1 };

      module_param_array(gpios, int, &ngpios, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);

      MODULE_PARM_DESC(gpios, "Defines the GPIOs number to be used as a list of"

                      " numbers separated by commas.");

      /* Logging stuff */

      #define __message(level, fmt, args...)                                 \

                      printk(level "%s: " fmt "\n" , NAME , ## args)

There are no code files for the following chapters:

  • Chapter 1 - Getting Started with Python and the Raspberry Pi Zero
  • Chapter 2 - Arithmetic Operations, Loops, and Blinky Lights
  • Chapter 3 - Conditional Statements, Functions, and Lists
  • Chapter 4 - Communication Interfaces
  • Chapter 5 - Data Types and Object-Oriented Programming in Python

Software and hardware requirements:

Chapter 1:

Software: Python 3.x, IDLE3, SD Formatter (Windows), Raspbian OS (latest version) Hardware: Raspberry Pi Zero with headers soldered, Keyboard, mouse, display cables etc.

Chapter 2:

Software:Raspbian OS installed on the software etc, Python3.x, IDLE3 (Comes installed by default). Hardware:Raspberry Pi Zero with headers soldered, resistors, Red LED, Powerswitchtail ii (optional:http://www.powerswitchtail.com/Pages/default.aspx)

Chapter 3:

Software: Raspbian OS installed on the software etc, Python3.x, IDLE3 (Comes installed by default). Hardware: Tactile push buttons (https://www.adafruit.com/products/1400), Motor control board of your choice (https://www.pololu.com/product/2753), DC motors of your choice.

Chapter 11: Software: (On a Windows environment): Putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html), WinSCP (https://winscp.net/eng/download.php), git for windows, text editor like Notepad++ etc.

Related Products:

Suggestions and Feedback

Click here if you have any feedback or suggestions.

python-programming-with-raspberry-pi's People

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.