Skip to content

carlosperate/micropython-driver-workshop

Repository files navigation

MicroPython Drivers Workshop

Welcome to the MicroPython Drivers Workshop!

This workshop will walk you through the steps to create a MicroPython driver for the MMA8653FC accelerometer built-in into the BBC micro:bit.

🗂️ Table of Contents

🚀 How To Use This Repository

If you are running the workshop in person there was an introductory presentation explaining basic concepts and the general workflow for embedded development.

The presentation Power Point can be found at the root of this repository. There is also a PDF version that can rendered within GitHub, so you can view it online.

The workshop folder contains the instructions and files for the workshop.

The easiest way to follow the workshop is to read the contents directly from GitHub, so there is no need to clone it in your computer.

📌 Requirements

You will need:

📚 Documentation You Will Need

The micro:bit MicroPython documentation can be found here:

Specifically the micro:bit MicroPython I2C documentation:

MicroPython upstream documentation:

📑 Datasheets

MMA8653FC Accelerometer

Microcontroller

Note: You will NOT need to look into this datasheet to complete the workshop, it is here only for additional information.

🔨 Troubleshooting

Mu

REPL doesn't work

If you are on Windows 7 or 8 you will need to install this driver: https://os.mbed.com/docs/mbed-os/v5.13/tutorials/windows-serial-driver.html

If you are on Linux, you might have to add yourself to the correct permissions group (usually the dialout or uucp groups).

Cannot flash the micro:bit

If you are on Linux, make sure the MICROBIT drive is mounter. If your distribution doesn't mount the drive automatically you might have to manually mount it.

Online Python Editor

WebUSB is not is necessary to complete the workshop, is a lot more convenient and quicker.

You can still access the REPL with any serial terminal in your computer and program the micro:bit by downloading the hex file from the Online Editor and copying it into the MICROBIT drive.

It says WebUSB is not supported

You will need to use Chrome (or a Chromium based browser) for WebUSB support.

When I try to connect to the device it gives me an error

Make sure the micro:bit firmware is at version 0249 or newer. Follow the instructions from this page to update the micro:bit firmware: https://microbit.org/guide/firmware/

It still cannot connect via WebUSB

Follow the troubleshooting section from this micro:bit support article: https://support.microbit.org/support/solutions/articles/19000084059-beta-testing-web-usb#troubleShooting

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages