Skip to content

About This Book

Welcome from Berry

Hi! I'm Berry.

Berry waving welcome Hi, I'm Berry — a raspberry with a circuit-board leaf cap and a tool belt, because I'm the kind of fruit that builds electronics! This book is my home base, and I'm here to walk with you across every hardware tier it covers, from your very first blinking LED on a $4 Pico all the way to real-time AI on a Raspberry Pi 5. Every wire tells a story, every bug is just a superpower waiting to be unlocked, and I can't wait to build something with you. Let's build something!

Why This Intelligent Textbook

Computers used to live behind a screen. Today they blink, spin motors, light up NeoPixel strips, and recognize objects in real time from a board a student can hold in one hand — and the same computational-thinking skills that light a single LED can, a few chapters later, train a Raspberry Pi 5 to spot a face or classify a sound. Yet most K-12 computing courses never leave the screen, teaching syntax without ever letting a program reach out and touch the physical world.

In the United States (2024):

  • Only 60% of U.S. public high schools offer a foundational computer science course, and just 6.4% of students are enrolled in one1
  • The U.S. Bureau of Labor Statistics projects 7% growth in computer hardware engineering employment from 2024 to 2034 — much faster than the average occupation — with about 4,700 openings a year2

Worldwide:

  • More than 68 million Raspberry Pi single-board computers have shipped worldwide, and 2025 is expected to be the first year microcontroller boards like the Pico outsell full single-board computers3
  • The Raspberry Pi Foundation's Code Club and CoderDojo network now reaches young people in 126 countries through more than 5,300 clubs4
  • The global market for edge AI hardware — the same class of accelerator used in this book's AI HAT+ projects — is projected to grow from roughly $7.7 billion in 2024 to $38 billion by 20305

These numbers point to the same gap from two directions: the hardware and AI accelerators your students will use for their entire careers are getting cheap and fast enough for any classroom, but too few students ever get a real chance to put their hands on them.

This book takes a fundamentally different approach. It is built on a learning graph of 531 interconnected concepts organized into 12 categories spanning five ascending hardware tiers — from a breadboard and a $4 Pico, through Pico-based STEM robots and wearables, up to the Raspberry Pi 500+ keyboard computer and a Raspberry Pi 5 running real-time AI. Concepts are introduced in the order their prerequisites are established, so understanding builds naturally from chapter to chapter. Throughout the book you will find nearly 100 interactive MicroSims — browser-based simulations that let students wire virtual breadboards, tune PWM signals, and watch a neural network's confidence score change, discovering principles through experimentation rather than memorization. The entire textbook is open source and free — no paywalls, no access codes, no expensive annual editions — and written at an accessible reading level with every technical term defined the first time it's used.

How to Use This Book

This textbook is designed for two overlapping readers at once: students (upper-elementary enrichment through grade 12, and motivated adult hobbyists) building real projects, and educators who need a single reference across the whole Raspberry Pi Foundation product line. Each chapter states its price tier, approximate build time, and grade band so you can dip in wherever fits your budget and available class time — the book is designed to be used like an encyclopedia, not necessarily read cover to cover. The book includes:

  • 20 Chapters spanning computational thinking, breadboard and GPIO fundamentals, NeoPixel LED art, STEM robot kits, clocks and wearables, wireless communication, the Raspberry Pi 500+ Linux desktop, and real-time image and audio recognition on the Raspberry Pi 5 with the AI HAT+
  • Nearly 100 interactive MicroSims embedded in chapters — browser-based simulations you can manipulate to explore wiring, timing, and AI concepts
  • Quizzes at the end of each chapter to test understanding
  • Annotated References linking to Wikipedia and authoritative sources
  • Glossary with definitions for every key concept
  • FAQ with common questions and answers
  • Learning Graph visualizing 531 concept dependencies across 12 categories
  • Search available from any page using the search bar

The Learning Graph visualizes how concepts connect across chapters and hardware tiers. If you want to explore non-linearly or check prerequisites for a specific topic, start there.

Part of the Raspberry Pi Foundation Series

Learning STEM with Raspberry Pi Hardware is the umbrella survey book in Dan McCreary's growing library of Raspberry Pi Foundation resources. Where this book goes wide — an encyclopedia spanning the entire product line — each companion book below goes deep on a single hardware family. Where a topic in this book is already covered in depth by one of these companion books, this book teaches just enough to be useful on its own and then points you to that book for the full treatment, so the series stays consistent without duplicating content.

  1. Learning Python — Python fundamentals and computational thinking for beginners, with extensive use of turtle graphics; designed to be used right after students learn block programming (Scratch) and before they ever touch a breadboard.
  2. Learning MicroPython — The full MicroPython sensor, display, and motor reference catalog. This course is ideal if you have a full sensor kit (about $100).
  3. Moving Rainbow — The full NeoPixel/WS2812B LED animation pattern library on a Pico breadboard. This book assumes only a low-cost $15 kit with a NeoPixel addressable LED strip.
  4. STEM Robots — Full-semester robot chassis construction, collision avoidance, line following, and robot face display. Robot kits start about about $22 and run up to $50 with OLED displays.
  5. Robot Faces — Deep OLED facial-expression programming for robots with MicroPython.
  6. Clocks and Watches — The full 20+ display-driver catalog for building custom clocks and wearables with MicroPython and AI. This book features an entire library of different clocks and watches with a range of displays and price points.
  7. AI Racing League — Autonomous RC car ML pipelines, neural network training, and the Donkey Car framework. The price points for a single car runs about $350.
  8. Robot Day — Running a single-day, station-based robotics event for your school or club.

Together with this book, that's a series of nine Creative Commons textbooks covering computational thinking and hands-on physical computing across the whole Raspberry Pi Foundation hardware line. This book assumes you already know basic Python syntax — variables, conditionals, loops, functions, and lists/dictionaries — and does not re-teach core language fundamentals; if you (or your students) are new to Python, start with Learning Python above before Chapter 1 here.

About the Author

Dan McCreary is a semi-retired AI researcher, solution architect, and educator who has spent more than three decades helping Fortune 100 organizations reason over massive datasets. At Optum he founded the Generative AI Center of Excellence and led the team that built one of the world's largest healthcare knowledge graphs — spanning over 25 billion vertices — to unify member, provider, and patient insights. Dan's deep background in knowledge representation and systems thinking underpins the precise learning graphs and intelligent textbook workflows used throughout this course.

He is the co-author of Making Sense of NoSQL (Manning Publications), the founding chair of the NoSQL Now! conference, and a frequent keynote speaker on semantic search, ontology strategy, and AI hardware. Beyond industry, Dan has mentored students as a STEM volunteer since 2014 and now applies the same rigor to building open educational resources. You can visit the Intelligent Textbooks Case Studies to see over 87 textbooks that Dan has created or co-created with other authors.

Selected Credentials

  • B.A. in Physics and Computer Science from Carleton College
  • M.S.E.E. from the University of Minnesota
  • MBA coursework at the University of St. Thomas
  • Patent holder in semantic search and ontology management techniques
  • Advocate for large-scale Enterprise Knowledge Graph adoption across healthcare and education
  • Long-time promoter of accessible, low-cost AI-powered learning experiences

How to Cite This Book

If you reference this textbook in academic work, curriculum proposals, lesson plans, or other publications, please use one of the following citation formats.

APA (7th edition)

McCreary, D. (2026). Learning STEM with Raspberry Pi Hardware. https://dmccreary.github.io/raspberry-pi-stem/

Chicago (17th edition)

McCreary, Dan. 2026. Learning STEM with Raspberry Pi Hardware. https://dmccreary.github.io/raspberry-pi-stem/.

MLA (9th edition)

McCreary, Dan. Learning STEM with Raspberry Pi Hardware. 2026, dmccreary.github.io/raspberry-pi-stem/.

BibTeX

@book{mccreary2026raspberrypistem,
  title     = {Learning STEM with Raspberry Pi Hardware},
  author    = {McCreary, Dan},
  year      = {2026},
  url       = {https://dmccreary.github.io/raspberry-pi-stem/},
  note      = {Interactive intelligent textbook}
}

To cite a specific chapter, append the chapter number and title — for example:

McCreary, D. (2026). Chapter 1: Computational Thinking and Debugging for Physical Computing. In Learning STEM with Raspberry Pi Hardware. https://dmccreary.github.io/raspberry-pi-stem/chapters/01-computational-thinking-debugging/

License

This work is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0). You are free to share and adapt the material for non-commercial purposes as long as you give appropriate credit and share your adaptations under the same license.

References


  1. Code.org, CSTA, and the ECEP Alliance. (2024). 2024 State of Computer Science Education: Roadmap to Innovation. https://advocacy.code.org/stateofcs/ 

  2. U.S. Bureau of Labor Statistics. (2025). Occupational Outlook Handbook: Computer Hardware Engineers. https://www.bls.gov/ooh/architecture-and-engineering/computer-hardware-engineers.htm 

  3. Raspberry Pi Holdings plc. (2025). FY 2024 Final Results. https://www.investegate.co.uk/announcement/rns/raspberry-pi-holdings-wi---rpi/fy-2024-final-results/8809266 

  4. Raspberry Pi Foundation. (2025). Gaining skills and confidence: The impact of Code Club and CoderDojo. https://www.raspberrypi.org/blog/the-impact-of-code-club-and-coderdojo-annual-clubs-survey/ 

  5. Grand View Research. (2025). Edge AI Accelerator Market Size & Share Report, 2025-2030. https://www.grandviewresearch.com/industry-analysis/edge-ai-accelerators-market-report