![MicroPython Cookbook](https://wfqqreader-1252317822.image.myqcloud.com/cover/609/36698609/b_36698609.jpg)
上QQ阅读APP看书,第一时间看更新
How to do it...
Let's have a look at how to do this:
- Execute the following pip3 install mu-editor command to install the Mu editor.
- Run the mu-editor command to start the editor.
- 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:
![](https://epubservercos.yuewen.com/F0709B/19470378808809006/epubprivate/OEBPS/Images/7c502520-9416-4efa-93be-c1d8a5e59d3d.png?sign=1738905735-BaJRXnV6VjhbExWa4EPF7rzALNlpi7T6-0-2f0086b52e630ac857167274c9e0caf6)
- Click the Serial button on the toolbar to open a REPL session with the device.
- 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.
- 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:
![](https://epubservercos.yuewen.com/F0709B/19470378808809006/epubprivate/OEBPS/Images/ce5e2439-ca20-4f8b-8c5e-3f29f4bf7ab1.png?sign=1738905735-Te5qf7DTQewdA8Ufu89Mc8DXVnKNLUWb-0-3c188b4cb9d2543cbc489f45a34b6e35)