18

esp32 micropython using uPycraft IDE

 4 years ago
source link: http://jeffsui.github.io/2020/03/24/esp32-micropython-using-uPyCraft/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

esp32 micropython using uPycraft IDE

2020-03-24

|

2020-04-09

| python

micropython

| 阅读次数: 51

1.1k

|

1 分钟

esp32 micropython 之旅 02 使用uPycraft IDE

20200326getting-started-esp32.jpg?raw=true

上次使用命令方式推送代码烧录到固件,今天介绍下micropython的几个著名的IDE。

  • Thonny IDE
  • uPyCraft IDE.

使用uPyCraft

Step 1. 点击这个链接下载uPyCraft 的.exe文件

Step 2. 双击安装包,打开安装后偶uPyCraft 可能是这个样子

20200326-Installing-uPyCraft-IDE-on-Windows-to-Program-ESP32.png?raw=true

uPyCraft 核心组件

1. Folder and Files
  • Device :设备 是esp32还是esp8266 还是microbit

  • SD : 包含文件存储的 SD 卡。很多不开发版都支持SD

  • uPy_lib: 包含micropython 内置模块

  • workSpace : 将保结果存到本地

2. Editor :编写python代码。

3. Shell/Terminal: 终端

4. Tools: 创建新文件,保存和上传文件到开发板上,关闭连接等功能。

开始烧录最新的 esp32 micropython 固件

首先,从这个站点,下载最新的esp32 micropython固件

Step 2.,打开 uPyCraft ,点击 *Tools-> Serial** 选择映射端口.

20200326Flashing-MicroPython-Firmware-on-ESP32-Board.png?raw=true

Step 2. 选择*Tools->board*.这里我们选择esp32

20200326-using-uPyCrfaft-burn-micropython.png?raw=true

Step 3. 开始烧录

20200326Flashing-MicroPython-Firmware-on-ESP32.png?raw=true

使用 uPyCraft IDE 上传代码到esp32

Step 1. 打开 uPyCraft IDE 和 Tools->boards,选择你的主板

Step 2. 直接点击 tools-> Serial\ 选择COM口.

Step 3. 点击Connect 连接IDE和esp主板

20200326Uploading-the-Code%20into-ESP32.png?raw=true

Step 4. 如果连接正常,则下面的终端区会显示 >>> 符号,此时可以执行micropython的命令。

Step 5.现在点击iNew File,并保存到本地。

20200326Programming-and-uploading-the-code-into-ESP32-using-uPyCraft-IDE.png?raw=true

Step 6. 点击新创建的文件,开始编写小灯程序的代码

1
2
3
4
5
6
from time import sleep
from machine import Pin
led = Pin(2, Pin.OUT)
while True:
led.value(not led.value())
sleep(1)

Step 7. 点击 Download and run\ 按钮

20200326uPyCraft-IDE-blink-script-to-board.png?raw=true

Step 8. 重新测试代码是否正确,点击 En/Reset\ 按钮。

不知道什么原因,win7操作系统 uPycraft 就是识别不了 我的板子,换成win10 一次性搞定。

坚持原创技术分享,您的支持将鼓励我继续创作!

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK