|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 720 KiB After Width: | Height: | Size: 212 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 87 KiB |
@@ -1,132 +0,0 @@
|
||||
# M5Stack-Core-Arduino —— Getting Started
|
||||
|
||||
|
||||
## 一、安装 USB 驱动
|
||||
|
||||
点击以下链接,下载 M5Stack-Core 的 USB 转串口驱动
|
||||
|
||||
https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
|
||||
|
||||
下载完之后,解压,根据系统位数,双击对应可执行文件
|
||||
|
||||
(Windows 32位,执行 CP210xVCPInstaller_x68.exe;Windows 64位,执行 CP210xVCPInstaller_x64.exe;)
|
||||
|
||||
*判断驱动安装是否成功:*
|
||||
如果安装成功,在插入 M5Stack 主控之后,设备管理器如下图所示出现,Silicon Labs 的 CP21x 系列串口端口号
|
||||
(我的电脑当前串口号是 COM3)
|
||||
|
||||

|
||||
|
||||
|
||||
## 二、开发环境
|
||||
## **Windows**
|
||||
### 1、安装 Arduino IDE
|
||||
|
||||
*下载地址*
|
||||
https://www.arduino.cc/en/Main/Software
|
||||
|
||||

|
||||
|
||||
|
||||
如下图所示修改 Arduino 路径为 D:\Program Files
|
||||
|
||||

|
||||
|
||||
|
||||
此时,Arduino 的安装路径为 D:\Program Files\Arduino
|
||||
|
||||

|
||||
|
||||
|
||||
### 2、下载 ESP32 相关支持包
|
||||
|
||||
(我的 Arduino 当前路径是 D:\Program Files\arduino)
|
||||
|
||||
进入 Arduino 安装路径的 hareware 文件夹,按住 Shift 键的同时,右键选择“在此处打开命令窗口”
|
||||
|
||||
|
||||
在打开的 Windows 终端 CMD 中输入如下命令
|
||||
|
||||
> * 创建 espressif 目录,并切换到此目录下
|
||||
|
||||
mkdir espressif && cd espressif
|
||||
|
||||

|
||||
|
||||
|
||||
> * 将 esp32 idf clone 在文件夹 esp32 下
|
||||
|
||||
git clone --recursive https://github.com/espressif/arduino-esp32.git esp32
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### 3、下载 ESP32 编译链 tools
|
||||
|
||||
进入此路径 D:\Program Files\arduino\hardware\espressif\esp32\tools
|
||||
选中并双击执行 get.exe 文件
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
### 4、Arduino IDE 中下载 M5Stack 的库
|
||||
|
||||
打开 Arduino IDE 之后,选择“项目”->“加载库”->“管理库...”,搜索“M5Stack”并点击“安装”
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
## 三、示例
|
||||
|
||||
USB 线连接 M5Stack 主控,选择串口和一个示例程序,compile and upload
|
||||
|
||||
### 1、打开一个示例程序,如打开 FactoryTest.ino
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
确认连接板子名称、串口波特率和当前串口号分别:M5Stack-Core-ESP32、921600、COM3(当前电脑串口号)
|
||||
|
||||

|
||||
|
||||
|
||||
编译运行成功之后,串口监视窗口显示如下
|
||||
|
||||
|
||||

|
||||
|
||||
### 2、新建一个 M5Stack 程序
|
||||
|
||||
打开 Arduino IDE 之后,新建 .ino 文件,并保存为 my_test.ino
|
||||
|
||||
将如下代码拷贝进文件中。
|
||||
|
||||
```cpp
|
||||
#include <M5Stack.h>
|
||||
|
||||
// the setup routine runs once when M5Stack starts up
|
||||
void setup(){tack
|
||||
|
||||
// Initialize the M5Stack object
|
||||
M5.begin();
|
||||
|
||||
// LCD display
|
||||
M5.Lcd.print("Hello World!");
|
||||
M5.Lcd.print("M5Stack is running successfully!");
|
||||
}
|
||||
|
||||
// the loop routine runs over and over again forever
|
||||
void loop() {
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
点击编译运行,此时 M5Stack 显示器显示 "Hello World!" "M5Stack is running successfully!"
|
||||
|
||||
|
||||
@@ -25,6 +25,6 @@ without any code after you power it.
|
||||
|
||||
Now, A WebCam you achieved successfully !
|
||||
|
||||
*Note:*
|
||||
.. note::
|
||||
|
||||
ESP32CAM AP only can connect with one device at a time.
|
||||
ESP32CAM AP only can connect with one device at a time.
|
||||
|
||||
@@ -43,4 +43,5 @@ Click ``Upload Local File`` for adding two necessary files ``motor.py``, ``i2c_b
|
||||
utime.sleep(3)
|
||||
stepmotor_0.StepMotor_XYZ(0, 0, 0, 500)
|
||||
|
||||
*Note: When step motor is running, supply it with 12V power.*
|
||||
.. note::
|
||||
When step motor is running, supply it with 12V power.*
|
||||
|
||||
@@ -31,9 +31,9 @@ the ``Baud`` which is 921600 following below steps.
|
||||
|
||||
.. image:: ../../_static/getting_started_pics/burn_firmware_02.png
|
||||
|
||||
**Note:**
|
||||
^^^^^^^^^^^
|
||||
If it does not display any ``COMx`` port or only ``COM1`` exists at the option, you need to visit this article `establish_serial_connection`_ and reinstall the USB driver.
|
||||
.. note::
|
||||
|
||||
If it does not display any ``COMx`` port or only ``COM1`` exists at the option, you need to visit this article `establish_serial_connection`_ and reinstall the USB driver.
|
||||
|
||||
.. _establish_serial_connection: establish_serial_connection.html
|
||||
|
||||
@@ -66,12 +66,11 @@ below, it means chip has been burnt successfully..
|
||||
|
||||
.. image:: ../../_static/getting_started_pics/burn_firmware_05.png
|
||||
|
||||
3. Then reset your board
|
||||
3. Reset your board
|
||||
::::::::::::::::::::::::::
|
||||
|
||||
**Note:**
|
||||
^^^^^^^^^^^
|
||||
.. note::
|
||||
|
||||
* If M5Burner means be busy after clicking ``Burn``, please wait for a few minutes. It'll be normal after the firmware has been burnt successfully.
|
||||
* If M5Burner means be busy after clicking ``Burn``, please wait for a few minutes. It'll be normal after the firmware has been burnt successfully.
|
||||
|
||||
* If the burning procedure has been interrupted(like M5Burner has been closed suddenly...), it's better to burn your board again.
|
||||
* If the burning procedure has been interrupted(like M5Burner has been closed suddenly...), it's better to burn your board again.
|
||||
|
||||
@@ -28,30 +28,27 @@ At the first time, you need to burn the specific firmware file(.bin) to your boa
|
||||
If you have one of ESP32 development boards listed below, click the corresponding one to start your development.
|
||||
|
||||
============================ ============================ ============================
|
||||
|Core with Arduino|_ |Core with Micropython|_ |M5GO|_
|
||||
|M5Stack Core|_ |M5GO|_ |M5CAMERA|_
|
||||
---------------------------- ---------------------------- ----------------------------
|
||||
`Core with Arduino`_ `Core with Micropython`_ `M5GO`_
|
||||
`M5Stack Core`_ `M5GO`_ `M5CAMERA`_
|
||||
---------------------------- ---------------------------- ----------------------------
|
||||
|ESP32CAM|_ |M5Stack STEPMOTOR Module|_ |M5Bala|_
|
||||
|M5CAMERA|_ |M5Stack STEPMOTOR|_ |M5Bala|_
|
||||
---------------------------- ---------------------------- ----------------------------
|
||||
`ESP32CAM`_ `M5Stack STEPMOTOR Module`_ `M5Bala`_
|
||||
`M5CAMERA`_ `M5Stack STEPMOTOR`_ `M5Bala`_
|
||||
============================ ============================ ============================
|
||||
|
||||
|
||||
.. |Core with Arduino| image:: ../../_static/pics/m5-arduino.jpg
|
||||
.. _Core with Arduino: M5Stack_Core_Get_Started_Arduino_Windows_en.html
|
||||
.. |M5Stack Core| image:: ../../_static/getting_started_pics/m5stack_core.png
|
||||
.. _M5Stack Core: m5stack_core_get_started.html
|
||||
|
||||
.. |Core with Micropython| image:: ../../_static/pics/m5-micropython.jpg
|
||||
.. _Core with Micropython: M5Stack_Core_Get_Started_MicroPython_Windows_en.html
|
||||
.. |M5GO| image:: ../../_static/getting_started_pics/m5go.jpg
|
||||
.. _M5GO: m5stack_core_get_started_MicroPython_Windows.html
|
||||
|
||||
.. |M5GO| image:: ../../_static/pics/M5GO.jpg
|
||||
.. _M5GO: M5Stack_Core_Get_Started_MicroPython_Windows_en.html
|
||||
.. |M5CAMERA| image:: ../../_static/getting_started_pics/m5camera.jpg
|
||||
.. _M5CAMERA: get-started-ESP32CAM.html
|
||||
|
||||
.. |ESP32CAM| image:: ../../_static/pics/ESP32CAM.jpg
|
||||
.. _ESP32CAM: get-started-ESP32CAM.html
|
||||
|
||||
.. |M5Stack STEPMOTOR Module| image:: ../../_static/pics/m5-stepmotor.jpg
|
||||
.. _M5Stack STEPMOTOR Module: get-started-StepMotor.html
|
||||
.. |M5Stack STEPMOTOR| image:: ../../_static/pics/m5-stepmotor.jpg
|
||||
.. _M5Stack STEPMOTOR: get-started-StepMotor.html
|
||||
|
||||
.. |M5Bala| image:: ../../_static/pics/M5Bala.jpg
|
||||
.. _M5Bala: get-started-M5Bala.html
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# M5Stack Core Get Started
|
||||
|
||||
### Pick up your OS below
|
||||
@@ -0,0 +1,17 @@
|
||||
M5Stack Core Get Started
|
||||
==============================================
|
||||
|
||||
Pick up your programming mode below for getting started
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
============================ ============================
|
||||
|Arduino|_ |Blockly/MicroPython|_
|
||||
---------------------------- ----------------------------
|
||||
`Arduino`_ `Blockly/MicroPython`_
|
||||
============================ ============================
|
||||
|
||||
.. |Arduino| image:: ../../_static/getting_started_pics/arduino_logo.png
|
||||
.. |Blockly/MicroPython| image:: ../../_static/getting_started_pics/micropython_logo.png
|
||||
|
||||
.. _Arduino: m5stack_core_get_started_Arduino_MacOS.html
|
||||
.. _Blockly/MicroPython: m5Stack_core_get_started_MicroPython_MacOS.html
|
||||
@@ -1,6 +1,11 @@
|
||||
M5Stack-Core Get Started(MacOS, Arduino)
|
||||
M5Stack Core Get Started(MacOS, Arduino)
|
||||
========================================
|
||||
|
||||
.. note::
|
||||
If your OS is Windows, please click `here`_.
|
||||
|
||||
.. _here: m5stack_core_get_started_Arduino_Windows.html
|
||||
|
||||
CONTENT
|
||||
~~~~~~~
|
||||
|
||||
@@ -17,9 +22,11 @@ CONTENT
|
||||
Setting Environment
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
*Before setting the development environment, we suggest you confirm
|
||||
whether the USB driver was installed. If not, please visit this link
|
||||
``establish serial connection``.* TODO: add a link
|
||||
.. note::
|
||||
|
||||
Before setting the development environment, we suggest you confirm whether the USB driver was installed. If not, please visit this link `establish serial connection`_.
|
||||
|
||||
.. _establish_serial_connection: establish_serial_connection.html
|
||||
|
||||
1. Install ``Arduino IDE``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -55,15 +62,13 @@ and navigating through the menu to "Arduino" > "Preferences" >
|
||||
"Sketchbook location". Adjust the command above accordingly if
|
||||
necessary!
|
||||
|
||||
**Note:** If you get the error below:
|
||||
``xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun``,
|
||||
install the command line dev tools by typing ``xcode-select --install``
|
||||
into the terminal and hit enter. once installed try the command above
|
||||
again and restart the Arduino IDE.
|
||||
.. note::
|
||||
|
||||
If you get the error:
|
||||
``IOError: [Errno socket error] [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) when running python get.py``,
|
||||
try ``python3`` instead of ``python`` and restart the Arduino IDE.
|
||||
* If you get the error below: ``xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools),``
|
||||
``missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun``, install the command line dev tools by typing ``xcode-select --install`` into the terminal and hit enter. once installed try the command above again and restart the Arduino IDE.
|
||||
|
||||
* If you get the error: ``IOError: [Errno socket error] [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol``
|
||||
``version (_ssl.c:590) when running python get.py``, try ``python3`` instead of ``python`` and restart the Arduino IDE.
|
||||
|
||||
3. Install M5Stack Library
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -123,6 +128,7 @@ does not appear. If this is the case, after you connect the M5 open
|
||||
|
||||
.. image:: ../../_static/getting_started_pics/m5stack_core/macOS_security_and_privacy_02.png
|
||||
|
||||
***If you want to read more the permission about the CP2104 USB driver,
|
||||
visit the below link please.***
|
||||
\*\*\*https://developer.apple.com/library/archive/technotes/tn2459/\_index.html\*\*\*
|
||||
.. note::
|
||||
|
||||
**If you want to read more the permission about the CP2104 USB driver, visit the below link please.**
|
||||
https://developer.apple.com/library/archive/technotes/tn2459/\_index.html
|
||||