MicroPython Cookbook
上QQ阅读APP看书,第一时间看更新

How to do it...

Let's have a look at how to do this:

  1. Execute the following pip3 install mu-editor command to install the Mu editor.
  2. Run the mu-editor command to start the editor.
  3. The first time you run the editor, it will ask which mode it should run in. On the following screenshot, select the Adafruit CircuitPython mode:
  1. Click the Serial button on the toolbar to open a REPL session with the device.
  2. On Linux systems, if a Cannot connect to device error appears, then exit the editor and start it again with the sudo /full/path/to/mu-editor command, where the absolute path to the editor is given.
  3. Once a connection is successfully made to the device, you can test the REPL by evaluating the 1+1 expression, which should produce output like the following screenshot: