/* jquery */ /* jquery accordion style*/ /* jquery init */

MicroPython Coding with Mu

What is Mu?
Mu is a free BBC micro:bit code editor, written in Python 3, designed to run on Microsoft Windows, Apple Mac and Linux computers or the popular Raspberry Pi.

Why Mu?
Mu has built-in support for the MicroPython language. It can flash programs to the micro:bit with a single click. And it has a special panel to help locate and fix coding errors.

Install Mu
Visit the Mu website codewith.mu, then follow the download and install instructions for your PC or Raspberry Pi.

Using Mu
Here's what the most important Mu icons do:
  New, Load and Save manage your Python code files.
  Flash creates a '.hex' file and uploads it to the micro:bit.
  Repl opens a command console and error debugging panel.

Coding With Mu
To begin coding follow these steps:
  1) Connect the micro:bit to the PC with a USB cable
  2) Start the Mu app and open a New code file
  3) Type in your code (see below)
  4) Open the Repl window panel (in case of any errors)
  5) Click the Flash icon to transfer and run your program

Hello Code Example
Carefully enter these two lines of Python code into Mu, then click the Flash icon to transfer it to the micro:bit device.

from microbit import *
display.scroll('Hello!')

After watching the message scroll across the LED display try replacing 'Hello!' with your own message, remembering to put it inside the quotes ('').

Return to the micro:bit MicroPython Coding Tutorials page.

No comments: