Python Programming
Hardware Platforms - Circuit Playground
Python Focused On The Adafruit Circuit Playground CPX and Blue
Python Programming With Circuit Playground CPX and Circuit Playground Blue
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, Circuit Playground CPX and Circuit Playground Blue
You'll work on developing programs and implementing them using Circuit Python and probably the Thonny IDE.
While you learn about and use the Circuit Playground 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.
Note From Mr. Burnham AKA "jim The STEAM Clown":
Why another Python class? - I think the main reason for another Python class, is that you can never find just the right site, with just the right examples... or structured just the way you want it. Some are too hot and some are too cold... for me, I'm hoping this class is just right. :-)
I'm am targeting this class to Engineering High School students, and I want to run my class a certain way, with lessons that are a specific length and complexity... While there are some AWESOME programming sites out there, I wanted a class I could point my students to, that was organized around my Mechatronics Engineering Python Units.
Believe me, I'm going to beg, borrow and "steal" any good code and point to sites that help me teach my students Python.
So, Sorry for another site and class for learning Python, Linux & Hardware like, Circuit Playground, ESP32, Raspberry Pi or Jetson Nano . Not Sorry...
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.
Getting Started
Much of my Python coding material is primarily derived from an Awesome class by Charles R. Severance, 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.
Text Books, Reference, Tutorials & Other Online Resources:
More Python Reference Resources
Online Python Interpreters
Browser-based Python Shell - https://www.python.org/shell/ - one command at a time
Browser-based Python interpreter - replit.com - 🛠️ LAB Activity - Signup for free account
Python Tutor - Interactive Code Visualization site - See code execute, see memory allocations, etc
Python Interpreter - Online GDB
Python Tutorial or Online Lesson Sites
W3School Python Tutorials - Comprehensive Python Tutorial and Reference Examples with options to try out code
Python Tutorial & Reference Guide - From Tutorials Point - Good Easy Learning - Reference & Examples
Python 2.7 On-Line Python Interpreter - Tutorials Point
Python Reference from Valley Of Code - Python Online Reference, that is really good.
CodeCademy - Python 3 - You can sign up. They want you to get a 7-day trial, but then they revert to a free option. Don't enter any Credit Card info, just register for the free options.
Python Code In An Hour - This is an Hour-long Webinar (if the link is broken check here on YouTube for a crappy recording)
Python Code Examples and Labs
(NEW) - exercism.org - Colding exercises. Solve coding exercises and get mentored to gain true fluency in your chosen programming languages. Exercism is open-source and not-for-profit. Not just Python, but lots of languages.
Ziro Studio - Tutorial and coding in a fun 3D world. It has examples of some complex code, which you can modify and "see" what happens.
CodingBat Python Exercises - Challenges you can practice coding. Check your code and even check for an implementation.
Circuit Playground CPX & Blue - Lessons, Lectures, Labs
8.3.1.1 - Circuit Playground CPX & Blue Getting Started & Introduction - 🤡 STEAM Clown - 📰️ Slides
Introduction to Circuit Playground CPX & Blue Getting Started & Introduction.
8.3.1.1.0 - Circuit Playground CPX & Blue Getting Started & Introduction - 📰 Slide Presentation
8.3.1.1.1 - Circuit Playground CPX & Blue - Circuit Python - 📰 Slide Presentation
8.3.1.1.2 - Access Browser IDE - IDE & My First Program - Blink - 📰 Slide Presentation
8.3.1.1.4 - Install Thonny - IDE - 📰 Slide Presentation
8.3.1.1.2 - Install CircuitPython Libraries - 📰 Slide Presentation
8.3.1.1.5 - My First Program... Again - Blink - 📰 Slide Presentation
8.3.1.2 - Circuit Playground CPX & Blue Features & Design Labs - 🤡 STEAM Clown - 📰️ Slides
Introduction to Circuit Playground CPX & Blue Getting Started & Introduction.
8.3.1.1 - Circuit Playground CPX & Blue 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.1.3 - Circuit Playground Projects - Teams Pick Something Fun!!! - 🤡 STEAM Clown - 📰️ Slides
8.3.1.3.1 - Circuit Playground Projects - 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