Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
MicroPython Projects

You're reading from   MicroPython Projects A do-it-yourself guide for embedded developers to build a range of applications using Python

Arrow left icon
Product type Paperback
Published in Apr 2020
Publisher Packt
ISBN-13 9781789958034
Length 294 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Brad Stewart Brad Stewart
Author Profile Icon Brad Stewart
Brad Stewart
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Down the Rabbit Hole with MicroPython 2. Managing Real-Time Tasks FREE CHAPTER 3. Writing a MicroPython Driver for an I/O Expander 4. Developing an Application Test Harness 5. Customizing the MicroPython Kernel Start Up Code 6. A Custom Debugging Tool to Visualize Sensor Data 7. Device Control Using Gestures 8. Automation and Control Using Android 9. Building an Object Detection Application Using Machine Learning 10. The Future of MicroPython 11. Downloading and Running MicroPython Code
12. Assessments 13. Other Books You May Enjoy

To get the most out of this book

This book assumes that the reader has a basic understanding of Python and that they have at least built a few embedded systems projects previously. The material is written so that a beginner will not have any problems and a more experienced embedded software developer will be able to quickly learn how to write MicroPython-based applications. I also assume that you are able to read flowcharts and basic wiring diagrams. The reader should also understand how to use a Git repository and install software on their computer.

Software/hardware covered in the book

OS requirements

PyCharm

Windows, Linux, macOS

PuTTY

Windows, Linux, macOS

Linux Virtual Machine

Windows, Linux, macOS

Python 3.x

Windows, Linux, macOS

Anaconda Terminal

Windows, Linux, macOS

Simple TCP Socket Tester

Windows, Linux, macOS

OpenMV IDE

Windows, Linux, macOS

Pyboard

-

RobotDyn I2C 8-bit PCA8574 I/O expander

-

Adafruit RGB Pushbutton PN: 3423 or equivalent

-

STM32L4 IoT Discovery Node

-

Robotdyn I2C 8-bit PCA8574 I/O expander

-

USB to UART Converter

-

Adafruit ADPS9960 breakout board

-

MicroPython supported development board

-

ESP32 WROVER-B

-

OpenMV Camera Module

-

The projects are not necessarily designed to be done in order. With that in mind, I would recommend that developers read the first two chapters in order before jumping to the project that is most interesting to them. These chapters give the background on MicroPython and how to schedule tasks. After that, it's up to the developer to decide on the order. As strange as this may sound, I would also encourage readers to make sure they read the last chapter as well, which introduces the pyboard-D, which may be the development board they decide to go with for most of their experimentation.

If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the Support tab.
  3. Click on Code Downloads.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/MicroPython-Projects. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Create new modules for each module that will be tested with _tests.py appended to the filename."

A block of code is set as follows:

def system_init():
print("Initializing system ...")
print("Starting application ...")

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

 try:
PushButton = RGB_Button.DeviceIO.Read()
except Exception as e:
sys.print_exception(e)
print("Exiting application ...")
sys.exit(0)

Any command-line input or output is written as follows:

pip install pySerial

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "See the MicroPython documentation | Quick reference for the pyboard | MicroPython tutorial for the pyboard | 3. Getting a MicroPython REPL prompt for details."

Warnings or important notes appear like this.
Tips and tricks appear like this.
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image