Learning IoT with Python(R) and Raspberry Pi(R)

Student Resources



  1. Videos
    1. About the Book: An overview of the contents of Learning IoT with Python and Raspberry Pi.
    2. Pickling Lesson: How to write objects to a file and how to read objects from a file.
    3. sets Lesson: How to write code which uses sets and set methods union, intersection, and minus as will as pickling is examined.
    4. Function Lesson: How to write a Python function that returns nothing meaningful and a function that returns more than one object. These concepts are illustrated by a program that predicts the velocity, distance traveled, and acceleration of a car from the time to go from 0 to 60 mph.
    5. SSH Lesson: How to use SSH, the Secure Shell, to remotely control a Raspberry Pi is explained. A Python script on the remote Raspberry Pi is run that gets the humidity from a Sense HAT and a message is scrolled on the Sense HAT.
    6. Introduction to Python objects: Five data types are introduced and the three features of Python objects- value, type, and identity- are explained. In addition, how to use built-in functions to determine the type and identity of a Python object is illustrated. It is shown how to call the methods and access the data descriptors of an object.
    7. Printing out in Python: The nano editor is used to edit text files on many Linux distributions, including Raspbian. In this video, you will learn how to use the nano editor to create and edit Python scripts. Also, you will learn how to run Python scripts from the Terminal.
    8. Using the nano editor: In this video, you will learn how to use the print() function to print out strings, floating-point numbers, integers, and the values of variables. In addition, you will learn how to use escape characters to print out a newline, a tab, a double quotation mark, a single quotation mark, and a backslash.
    9. Thonny IDE to Create Python Scripts: The Thonny Integrated Developers Environment is used to create and edit Python scripts. Run Python code interactively and write, save, and run Python scripts.
    10. Domain Name System: How Fully Qualified Domain Names (FQDNs) are resolved to IP addresses by Domain Name System (DNS) is explained. The purpose of DNS resource records, forward and reverse lookup zones, and the function of primary, secondary, and caching-only name servers is discussed.
    11. DNS Lesson Part Two: This second video covers the steps to install and configure BIND 9 on the Raspberry Pi. You will learn how to implement the Domain Name System that is authoritative for a local domain. Troubleshooting procedure for DNS is also examined.
    12. DNS Lesson Part Three: This third video covers additional commands to troubleshoot DNS, set a static IP address for the Raspberry Pi, SSH into a remote Raspberry Pi, configure a secondary name server with a read only copy of the zones, configuring NTP (Network Time Protocol) to synchronize names servers with a reference clock, and viewing the daemon.log to views zone transfers from the primary name server to the secondary name server.
    13. Basic Debugging: The viewer will learn how to identify the effect of some common programming mistakes including a misspelled variable name, a missing parenthesis, and using a variable before it has been assigned a value.
    14. The if statement: In this video, you will learn how to write an if statement to control the flow of execution. Several examples are explained including a script which demonstrates how to control a piezo buzzer using an if statement.
    15. The if-elif-else statement: The Python if statement with more than one clause is explained, in particular, the if-else statement and the if-elif-else statement. It is demonstrated how an if-elif-else statement can be used to control a piezo buzzer.
    16. The while statement:The Python while statement is explained, and examples of an infinite while loop, a counter control while loop, and a sentinel control while loop are given. It is demonstrated how a while statement can be used to control a piezo buzzer.
    17. Controlling the Hue Light BulbIn this lesson you will learn how to write Python code which will turn on and turn off a Hue light bulb. The encode() method of the JSONEncoder class and the urlopen() method of the Request class will be used in the code. The light bulb will also be turned on and off in response to a change in humidity measured by the Sense HAT.
    18. The for statement:In this video lecture, you will learn how to use a for loop to iterate over a sequence of numbers, the characters in a string, and the items in a list.
    19. Writing and reading text files:In this video lecture, you will learn how to open a text file with write-only access and with read/write access. Humidity data is read in from the Sense HAT and written to a text file.
    20. Using Tuples:In this lesson you will learn about tuples. A tuple is an iterable,immutable data type. How to create a tuple, the count() method and index() method, and how an item in a tuple cannot be updated are explained. A function is defined which returns a tuple, and a for loop is used to iterate through the items in the returned tuple.
    21. Using Dictionaries:In this lesson you will learn how to add, delete, and access items in a dictionary.
    22. Using a Hall Effect sensor Lesson: How to use a Hall Effect sensor with the Raspberry Pi will be shown in this video. Coming Soon.
  2. Suppliers
    1. Adafruit Industries
    2. Parallax Inc.
    3. Sparkfun Electronics®
  3. Services
    1. IFTTT Inc.
    2. Twilio Inc.
  4. Servers
    1. The Apache HTTP Server™
    2. MySQL Server
    3. vsftpd secure FTP server