20210422.4
Buy a piece of MicroPython PyBoard (v1.1).
(Download the 'MicroPython从0到1' from 01Studio.)
Open the micropython web.
Proceed from 'MicroPython tutorial for the pyboard'.
Edit the main.py file, save it, eject the board, press the RST switch to run the script.
import pyb
pyb.LED(4).on()
REPL prompt:
The driver for using the serial USB device was installed, but not exactly as described in the guide. It appears as COM7. The device can then be operated in the REPL mode.
It is better to open the Device Manager first. Then plug the board and observe that the USB serial device appears in the Device Manager.
Although a serial terminal program such as PuTTY can be used, it is easier to use an IDE-like program such as Mu editor. This is described in 'MicroPython从0到1'. The document is in Chinese, but the procedure is easy to follow.
To develop programs in the REPL mode, it is necessary to know some control keys such as 'paste mode' described in 'MicroPython language and implementation' in the Pyboard documents.
Comments
Post a Comment