Python Programming
Hardware Platforms - Raspberry Pi 3/4/5
Python Focused On The Raspberry Pi 3B / 4 / 5
WORK IN PROGRESS
(2/24/2024) - I'm working on this module, but it's not at the top of my priority list. That's because I have passed this section in my class this year, or we have not got to it yet... either way, I'm way behind. ALSO my ADHD and ability to fucus on projects because other "shiny" projects keep getting in the way does not help... If you wanted to help shape my priorities, you could connect with me here on my "How To Support My Curriculum Development" page
Python Programming With The Raspberry Pi
Unit Overview and Outline:
Author: Jim Burnham - TopClown@STEAMClown.org. License: Distributed as Open Source.
In this course, you will learn some Python and focus your programs to run on the Python capable hardware board, Raspberry Pi 3B / 4 / 5
You'll work on developing programs and implementing them using a Raspberry Pi and probably the Thonny IDE.
While you learn about and use the Raspberry Pi Hardware, you will also spend some time learning about and gaining experience in the best practices in software development, such as top-down design, object-oriented design, code debug, code validation, corner case testing, and technical/end-user documentation.
This page has links to Python and other programming resources. Links to class text books and other resources are found here. Please let topClown@steamclown.org know if there are any broken links or errors... or improvement suggestions.
Learning Objective:
This Python & IoT Unit is intended to introduce students not just the syntax of coding, but to the concept of Design Thinking when playing with Python capable hardware like a Circuit Playground, ESP32, Raspberry Pi or Jetson Nano, or planning and writing a Python Program.
Inspire Life Long Learning by applying concepts like Design Thinking and Computational Thinking, Top Down Design and step by step Problem Decomposition and Debugging
Students will have a basic, but fundamental knowledge of setting up, configuring, and connecting Python capable hardware like a Circuit Playground, ESP32, Raspberry Pi or Jetson Nano to the physical "Real" world.
Apply Scientific Methods, fundamental principles of computer science to design Top Down, modular and reusable Python code
Demonstrate the principles of object-oriented programming and the interplay of algorithms and data structures in well-written modular code;
Solve Python coding exercises and problems requiring the writing of well-documented programs in the Python language
Demonstrate significant experience with Python capable hardware like a Circuit Playground, ESP32, Raspberry Pi or Jetson Nano and the IDLE or Thonny Python program development environments.
Prerequisites:
No explicit prerequisite course work or coding knowledge is required, but students are expected to have a good understanding of basic computer principles. You will need to have access to Python capable hardware like a Circuit Playground, ESP32, Raspberry Pi or Jetson Nano or a personal computer so you can write programs and do the lab assignments and the final project. Python runs on Windows, Mac OS X, and Linux, so almost any computer will do.
Access to Python capable hardware like a Circuit Playground, ESP32, Raspberry Pi or Jetson Nano - In class, we'll be showing programming examples on all of these hardware platforms, using the Python IDLE and/or Thonny IDE application or working inside a Terminal window. We'll be using Python 3 in this course.
Some Source Acknowledgments and Attributions
Much of the content in these slides is a Re-Telling of Python material from these and other sites:
The first is Awesome material provided by Dr. Chuck Severance - From PY4E, and his collateral can be found on the https://www.py4e.com/ site. He has a Copyright 2010 - Charles R. Severance (www.dr-chuck.com) of the University of Michigan School of Information and has, like me, made his material available under a Creative Commons Attribution License. If you use mine and/or his collateral, please maintain your collateral with the attribution requirements of the license.
Additional material is adapted from the book Automate the Boring Stuff with Python. Al Sweigart is a software developer and tech book author living in Houston. He has written several programming books for beginners, including Automate the Boring Stuff with Python. His books are freely available under a Creative Commons license at his website https://inventwithpython.com.
Both are Awesome open source sites for teaching Python. I have modified them some, to work better for my Mechatronics Engineering class. ChatGPT, Other open-source technical sites.
Getting Started
Text Books, Reference, Tutorials & Other Online Resources:
Open Source Books, and other Reference Material:
kk
If You Are In My Mechatronics Class or Workshops:
(These sources have copywrites and if you are not in my class, you should buy your own personal copy)
kk
Raspberry Pi - Lessons, Lectures, Labs
8.3.4.1 - Raspberry Pi - Introduction (Story Time, No Power) - 🤡 STEAM Clown - 📰️ Slides
Introduction to Raspberry Pi - Getting Started & Introduction.
8.3.4.1 - Raspberry Pi - Introduction (Story Time, No Power) - 📰 Slide Presentation
8.3.4.2 - Raspberry Pi - Getting Started - 🤡 STEAM Clown - 📰️ Slides
Introduction to Raspberry Pi - Getting Started
8.3.4.2 - Raspberry Pi - Getting Started - 📰 Slide Presentation
8.3.4.3 - Raspberry Pi - Getting Started - 🤡 STEAM Clown - 📰️ Slides
Introduction to Raspberry Pi - Getting Started
8.3.4.2 - Raspberry Pi - Getting Started - 📰 Slide Presentation
8.3.4.1.1 - Raspberry Pi - Getting Started & Introduction - 📰 Slide Presentation
8.3.4.1.2 - Access Browser IDE - IDE & My First Raspberry Pi Program - Blink - 📰 Slide Presentation
8.3.4.1.4 - Install Thonny - IDE - 📰 Slide Presentation
8.3.4.1.2 - Install Raspberry Pi Libraries - 📰 Slide Presentation
8.3.4.1.5 - My First Program... Again - Blink - 📰 Slide Presentation
8.3.4.2 - Raspberry Pi - Features & Design Labs - 🤡 STEAM Clown - 📰️ Slides
Introduction to Raspberry Pi - Getting Started & Introduction.
8.3.4.1 - Raspberry Pi - Getting Started & Introduction - 📰 Slide Presentation
8.3.1.2 - Circuit Playground CPX & Blue - Circuit Python - 📰 Slide Presentation
8.3.1.3 - Install Thonny - IDE - 📰 Slide Presentation
8.3.4.3 - Raspberry Pi - Teams Pick Something Fun!!! - 🤡 STEAM Clown - 📰️ Slides
8.3.1.3.1 - Raspberry Pi - Teams Pick Something Fun!!! - 📰 Slide Presentation
8.3.1.3.1.1 - Circuit Playground Projects - Teams Pick Something Fun!!! - 📖 Lesson Tutorial
Links To Projects
While there may be code provided, my recommendation is that you try to write the code yourself, before you copy someone else code... because the whole point is to learn to write Python programs.Tech With Mike - 🛠️ LAB Activity - https://www.mrmichaelsclass.com/other/circuit-playground/circuit-playground-projects - This site has a few fun projects for teams to pick. I think the ball maze would be fun.
Circuit Playground CPX & Blue - <topic> - LAB #2 - 🛠️ LAB Activity (Coming Soon... Really, I'm working on it...)
Mechatronics Engineering Introduction - <topic>
This Lesson is coming soon - click here to be notified when it's available - Professional Development Newsletter
Mechatronics - <topic> - 📖 Lesson Tutorial
Mechatronics - <topic> - 📽️ Video / 🎧 Podcast
Mechatronics - <topic> - 📰 Slide Presentation (Coming Soon... Really, I'm working on it...)
Mechatronics - <topic> - LAB #1 - 🛠️ LAB Activity
Mechatronics - <topic> - LAB #2 - 🛠️ LAB Activity
Mechatronics - <topic> - LAB #3 - 🛠️ LAB Activity
OLD Stuff - Move or Delete -
Raspberry Pi & Python Lessons, Lectures, Labs
Lesson 1 - Raspberry Pi - Introduction - Programming The Raspberry Pi - Getting Started With Python-SimonMonk
This is the start of the Raspberry Pi and Python Module. This Lesson is an introduction to the physical Raspberry Pi and the Python language. As part of class, you will receive a Raspberry Pi and will be introduced to the “textbook” we will be using, Programming the Raspberry Pi – Getting Started with Python by Simon Monk and Think Python: How to Think Like a Computer Scientist (HTML) by Allen B. Downey (other text are fine, and some are referenced in lesson and the resources section). This lesson will include the following activities: Research on what you can do with a Raspberry Pi, Instruction Lecture, where the textbook is introduced, where you can read chapter 1 and take a quiz; Then you will get a Raspberry Pi checked out to you for the semester and you will be lead through the process of setting up your Raspberry Pi, and then maybe even having time to play Minecraft...
This lesson focused on the Raspberry Pi Desktop menus and the Linux Bash Shell in the Command Line Terminal . You learn and will understand how to navigate the desktop menus, use get-apt to update tools and applications, have experience using and learning about some basic command line commands on their Raspberry Pi’s.
Lesson 3 - What Is The Shell - More Command Line (update lesson link)
Lesson 4 - Raspberry Pi - Introduction to the Raspberry Pi IDLE3 (update lesson link)
Lesson 5 - Python - Introduction (update lesson link)
Lesson 6 - Python - Shell - Runtime Interpreter (update lesson link)
Lesson 7 - Python - My First Python Program (update lesson link)
Lesson 8 - Python - Conditional (update lesson link)
Lesson 9 - Python - Functions (update lesson link)
Lesson 10 - Python - Loops & Iterations (update presentation - py4e - lessons)
Lesson 11 - Python - Top Down Design (update lesson link)
Lesson 12 - Python - Strings (update presentation - py4e - lessons)
Lesson-13 - Python - Files (update lesson link)
Lesson 14 - Python - Lists (update presentation - py4e - lessons)
Lesson 15 - Python - Dictionaries (update presentation - py4e - lessons)
Lesson 16 - Python - Tuples (update presentation - py4e - lessons)
Lesson 17 - Python - Regular Expressions (update presentation - py4e - lessons)
Lesson 18 - Python - HTTP (update presentation - py4e - lessons)
Lesson 19 - Python - Web Services (update presentation - py4e - lessons)
Lesson 20 - Python - Objects (update presentation - py4e - lessons)
Lesson 21 - Python - Databases (update presentation - py4e - lessons)
Lesson 22 - Python - Data Visualization (update presentation - py4e - lessons)
Lesson 23- Python - Whats Next?
Cool Sites You Should Look At:
How To Raspberry Pi - Site has lots of tutorials like Instructables...
Teachers - Unit, Module and Lesson Plans
To access this area, you will have needed to connect with me so I can Share the content with you. Please go to the Teachers & Partner Page,, check out my Licensing and fill out my Curriculum Request Form. I'll review and then grant you access to the requested areas and lesson plans
Random Stuff To Sort
Raspberry Pi Resources on Kerry Bruce's Google drive
Cheat sheet - https://programmingwithmosh.com/python/python-3-cheat-sheet/
good tutorial series - Introduction and Parts - Raspberry Pi and Python tutorials p.1 - maybe assign this as home work when we take our Raspberry Pi's home
Element 14 - Getting Started With The Raspberry Pi 3
How To Log Into Python Learning Sites
TryPython - Fun Interactive Class (you have to pay now)
CodeCademy - Learn Python
Mechatronics Python Class Slides
Python Introduction - Some python and some cygwin command line
Lesson 1 - Running The Python Interpreter
Lesson 2 - Getting Ready to Write a Program
Lesson 3 - Writing and Running a Program
Code Example Sites
jim.the.STEAM.Clown's Github - https://github.com/jimTheSTEAMClown/Python-Code
Tutorials
Adafruit Raspberry PI & Python Project Tutorials <-- lots of Python specific projects
Links To Web Based Python Compilers
ideone - https://ideone.com/
codepad - http://codepad.org/
Reference Sites
The Python Tutorial - Good place to Start
Official Pi Project Book - magiPi link to Raspberry Pi projects
Full Stack Python - Some useful Full Stack Videos too...
Introduction Slide Deck for Python - Mr Ganesh Bhosale
More Random site use as reference while creating this site
Random Resource Links - Stuff to review and sort...
This is where my Raspberry Pi Resource will go... they will show up in about 2 weeks (Jan 7 2019)... in the mean time you can see my Python Resource page from last year 2017-2018 <-- this will go away as soon as I have made this organizational update