Book Image

MicroPython Projects

By : Jacob Beningo
Book Image

MicroPython Projects

By: Jacob Beningo

Overview of this book

With the increasing complexity of embedded systems seen over the past few years, developers are looking for ways to manage them easily by solving problems without spending a lot of time on finding supported peripherals. MicroPython is an efficient and lean implementation of the Python 3 programming language, which is optimized to run on microcontrollers. MicroPython Projects will guide you in building and managing your embedded systems with ease. This book is a comprehensive project-based guide that will help you build a wide range of projects and give you the confidence to design complex projects spanning new areas of technology such as electronic applications, automation devices, and IoT applications. While building seven engaging projects, you'll learn how to enable devices to communicate with each other, access and control devices over a TCP/IP socket, and store and retrieve data. The complexity will increase progressively as you work on different projects, covering areas such as driver design, sensor interfacing, and MicroPython kernel customization. By the end of this MicroPython book, you'll be able to develop industry-standard embedded systems and keep up with the evolution of the Internet of Things.
Table of Contents (14 chapters)
11
Downloading and Running MicroPython Code

Chapter 2

  1. What characteristics define a real-time embedded system?
    • They are event driven and do not poll inputs.
    • They are deterministic; given the same initial conditions, they produce the same outputs in the same time frame.
    • They are often resource constrained in some manner, such as the following:
      • Clock speed
      • Memory
      • Energy consumption
    • The use of a dedicated microcontroller-based processor.
    • May have a RTOS to manage system tasks.
  2. What four scheduling algorithms are commonly used with MicroPython?
    • Round robin scheduling
    • Periodic scheduling using timers
    • Cooperative scheduling
    • MicroPython threads
  1. What best practices should a developer follow when using callbacks in MicroPython?
    • Keep interrupt service routines (ISRs) short and fast.
    • Perform measurements to understand interrupt timing and latency.
    • Use interrupt priority settings to emulate preemption.
    • Make sure task variables...