diff --git a/_static/getting_started_pics/m5stack_core/display_hello_world.png b/_static/getting_started_pics/m5stack_core/display_hello_world.png new file mode 100644 index 00000000..d4ffae69 Binary files /dev/null and b/_static/getting_started_pics/m5stack_core/display_hello_world.png differ diff --git a/_static/getting_started_pics/m5stack_core/macOS_download_arduino_ide.png b/_static/getting_started_pics/m5stack_core/macOS_download_arduino_ide.png new file mode 100644 index 00000000..3d0fd000 Binary files /dev/null and b/_static/getting_started_pics/m5stack_core/macOS_download_arduino_ide.png differ diff --git a/_static/getting_started_pics/m5stack_core/macOS_example_hello_world.png b/_static/getting_started_pics/m5stack_core/macOS_example_hello_world.png new file mode 100644 index 00000000..dbadf662 Binary files /dev/null and b/_static/getting_started_pics/m5stack_core/macOS_example_hello_world.png differ diff --git a/_static/getting_started_pics/m5stack_core/macOS_install_m5stack_lib.png b/_static/getting_started_pics/m5stack_core/macOS_install_m5stack_lib.png new file mode 100644 index 00000000..0a804732 Binary files /dev/null and b/_static/getting_started_pics/m5stack_core/macOS_install_m5stack_lib.png differ diff --git a/_static/getting_started_pics/m5stack_core/macOS_search_m5stack.png b/_static/getting_started_pics/m5stack_core/macOS_search_m5stack.png new file mode 100644 index 00000000..90fbc88e Binary files /dev/null and b/_static/getting_started_pics/m5stack_core/macOS_search_m5stack.png differ diff --git a/_static/getting_started_pics/m5stack_core/macOS_security_and_privacy.png b/_static/getting_started_pics/m5stack_core/macOS_security_and_privacy.png new file mode 100644 index 00000000..c7c060ea Binary files /dev/null and b/_static/getting_started_pics/m5stack_core/macOS_security_and_privacy.png differ diff --git a/_static/getting_started_pics/m5stack_core/macOS_security_and_privacy_01.png b/_static/getting_started_pics/m5stack_core/macOS_security_and_privacy_01.png new file mode 100644 index 00000000..38e4a00f Binary files /dev/null and b/_static/getting_started_pics/m5stack_core/macOS_security_and_privacy_01.png differ diff --git a/_static/getting_started_pics/m5stack_core/macOS_security_and_privacy_02.png b/_static/getting_started_pics/m5stack_core/macOS_security_and_privacy_02.png new file mode 100644 index 00000000..d9479b08 Binary files /dev/null and b/_static/getting_started_pics/m5stack_core/macOS_security_and_privacy_02.png differ diff --git a/_static/getting_started_pics/m5stack_core/macOS_select_board.png b/_static/getting_started_pics/m5stack_core/macOS_select_board.png new file mode 100644 index 00000000..88c7a198 Binary files /dev/null and b/_static/getting_started_pics/m5stack_core/macOS_select_board.png differ diff --git a/_static/getting_started_pics/m5stack_core/macOS_select_example.png b/_static/getting_started_pics/m5stack_core/macOS_select_example.png new file mode 100644 index 00000000..7c7cc583 Binary files /dev/null and b/_static/getting_started_pics/m5stack_core/macOS_select_example.png differ diff --git a/_static/getting_started_pics/m5stack_core/macOS_select_serial_port.png b/_static/getting_started_pics/m5stack_core/macOS_select_serial_port.png new file mode 100644 index 00000000..bbda687c Binary files /dev/null and b/_static/getting_started_pics/m5stack_core/macOS_select_serial_port.png differ diff --git a/en/get-started/M5Stack-Core-Arduino_Getting_Started_en.md b/en/get-started/M5Stack-Core-Arduino_Getting_Started_en.md deleted file mode 100644 index a3a565c5..00000000 --- a/en/get-started/M5Stack-Core-Arduino_Getting_Started_en.md +++ /dev/null @@ -1,111 +0,0 @@ -# M5Stack-Core-Arduino —— Getting Started - -## **Windows** -#### 1. install `Arduino IDE` - -*download address* -https://www.arduino.cc/en/Main/Software - -![image](../../_static/screenshots/arduino_cc_package.png) - - -modified the path of Arduino as `D:\Program Files` as shown below - -![image](../../_static/screenshots/select_arduino_install_path.png) - - -Now my path of Arduino is `D:\Program Files\Arduino` - -![image](../../_static/screenshots/arduino_path.png) - - -#### 2. Download toolchain - -(Now my path of Arduino is `D:\Program Files\Arduino`) - -Enter the path `D:\Program Files\Arduino\hareware` via the terminal of Windows - -Execute the following commands on the terminal of Windows -> * new a directory named `espressif`, then enter this directory - -mkdir espressif && cd espressif - -![image](../../_static/screenshots/mkdir_espressif.png) - - -> * clone `esp32 idf` at the directory named `esp32` - -git clone --recursive https://github.com/espressif/arduino-esp32.git esp32 - -![image](../../_static/screenshots/download_idf.png) - - - -#### 3. ESP32 toolchain - -Enter the path `D:\Program Files\arduino\hardware\espressif\esp32\tools` -double click on `get.exe` - -![image](../../_static/screenshots/select_get_exe_file.png) - -![image](../../_static/screenshots/download_xtensa_tools.png) - - -#### 4. Download the M5Stack Lib via Arduino IDE - -Open Arduino IDE, then Select `Sketch`->`Include Library`->`Manage Libraries...` -Search `M5Stack` and install it - -![image](../../_static/screenshots/select_arduino_lib.png) - -![image](../../_static/screenshots/download_m5stack_lib.png) - - -## Example - -The USB cable connects to M5Stack Core, then select your serial port which is connected M5Stack Core. -Select a demo example, compile and upload - -#### 1. Open a example likes `FactoryTest.ino` - -![image](../../_static/screenshots/select_demo.png) - - - -Comfire your board name, baudrate, the specified serial port: M5Stack-Core-ESP32、921600、COM3 - -![image](../../_static/screenshots/select_board_and_com.png) - -After upload seccessfully, open the Serial Monitor - -![image](../../_static/screenshots/FactoryTest_result.png) - -#### 2. New a M5Stack program - -Open Arduino IDE, then new a `.ino` file, rename it as `my_test.ino` - -Copy the below code to my_test.ino - -```cpp -#include - -// 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() { - -} -``` - -compile it and upload, the M5Stack screen will show "Hello World!" "M5Stack is running successfully!" - - diff --git a/en/get-started/M5Stack-Core-Arduino_Getting_Started_zh_CN.md b/en/get-started/M5Stack-Core-Arduino_Getting_Started_zh_CN.md deleted file mode 100644 index e439102b..00000000 --- a/en/get-started/M5Stack-Core-Arduino_Getting_Started_zh_CN.md +++ /dev/null @@ -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) - -![image](screenshots/my_com.png) - - -## 二、开发环境 -## **Windows** -### 1、安装 Arduino IDE - -*下载地址* -https://www.arduino.cc/en/Main/Software - -![image](screenshots/arduino_cc_package.png) - - -如下图所示修改 Arduino 路径为 D:\Program Files - -![image](screenshots/select_arduino_install_path.png) - - -此时,Arduino 的安装路径为 D:\Program Files\Arduino - -![image](screenshots/arduino_path.png) - - -### 2、下载 ESP32 相关支持包 - -(我的 Arduino 当前路径是 D:\Program Files\arduino) - -进入 Arduino 安装路径的 hareware 文件夹,按住 Shift 键的同时,右键选择“在此处打开命令窗口” - - -在打开的 Windows 终端 CMD 中输入如下命令 - -> * 创建 espressif 目录,并切换到此目录下 - -mkdir espressif && cd espressif - -![image](screenshots/mkdir_espressif.png) - - -> * 将 esp32 idf clone 在文件夹 esp32 下 - -git clone --recursive https://github.com/espressif/arduino-esp32.git esp32 - -![image](screenshots/download_idf.png) - - - -### 3、下载 ESP32 编译链 tools - -进入此路径 D:\Program Files\arduino\hardware\espressif\esp32\tools -选中并双击执行 get.exe 文件 - -![image](screenshots/select_get_exe_file.png) - -![image](screenshots/download_xtensa_tools.png) - - -### 4、Arduino IDE 中下载 M5Stack 的库 - -打开 Arduino IDE 之后,选择“项目”->“加载库”->“管理库...”,搜索“M5Stack”并点击“安装” - -![image](screenshots/select_arduino_lib.png) - -![image](screenshots/download_m5stack_lib.png) - - -## 三、示例 - -USB 线连接 M5Stack 主控,选择串口和一个示例程序,compile and upload - -### 1、打开一个示例程序,如打开 FactoryTest.ino - -![image](screenshots/select_demo.png) - - - -确认连接板子名称、串口波特率和当前串口号分别:M5Stack-Core-ESP32、921600、COM3(当前电脑串口号) - -![image](screenshots/select_board_and_com.png) - - -编译运行成功之后,串口监视窗口显示如下 - - -![image](screenshots/FactoryTest_result.png) - -### 2、新建一个 M5Stack 程序 - -打开 Arduino IDE 之后,新建 .ino 文件,并保存为 my_test.ino - -将如下代码拷贝进文件中。 - -```cpp -#include - -// 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!" - - diff --git a/en/get-started/M5Stack-MicroPython_Getting_Started.md b/en/get-started/M5Stack-MicroPython_Getting_Started.md deleted file mode 100644 index d27f9da3..00000000 --- a/en/get-started/M5Stack-MicroPython_Getting_Started.md +++ /dev/null @@ -1,118 +0,0 @@ - -### CONTENT - -1. [Burn Firmware](#Burn-Firmwared) - - - [1. Download Firmware](#1-download-firmware) - - - [2. Burn to M5Stack](#2-Burn-to-M5Stack) - -1. [Connect Wi-Fi](#connect-wi-fi) - -3. [Binding device](#binding-device) - -4. [Coding MicroPython](#coding-micropython) - - -### Burn Firmware -#### 1. Download Firmware -https://github.com/m5stack/M5Cloud/tree/master/firmwares - -Now, the M5Cloud firmware I downloaded named `m5cloud-20180516-v0.4.0.bin` -and it saved at `~/smbshare` - -#### 2. Burn to M5Stack -![image](../../_static/windows-logo.png) | ![image](../../_static/linux-logo.png) | ![image](../../_static/macos-logo.png) ----|---|--- -Windows | Linux | MacOS - -***Windows*** - -open Flash Download Tools([点击下载](https://www.espressif.com/sites/default/files/tools/flash_download_tools_v3.6.4.rar)) apply by Espressif, choose `ESP32 DownloadTool` option and execute three steps ( *choose firmware file, your serial port, erase and program flash* ) as shown below - -![image](../../_static/M5Stack_MicroPython_UserGuidePictures/windows_download_firmware.png) - - - -***MacOS/Linux*** - -*1. Check port on Linux and MacOS* - - To check the device name for the serial port of your M5Stack board (or external converter dongle), run this command two times, first with the board / dongle unplugged, then with plugged in. The port which appears the second time is the one you need: - - Linux - - ``` - ls /dev/tty* - ``` - - MacOS - - ``` - ls /dev/cu.* - ``` - - -*2. Adding user to `dialout` on Linux* - -The currently logged user should have read and write access the serial port over USB. On most Linux distributions, this is done by adding the user to `dialout` group with the following command: - - ``` - sudo usermod -a -G dialout $USER - ``` -Now, my serial port named `ttyUSB0` - -*3. Download M5Cloud firmware to M5Stack board* - - Installing esptool: - ``` - pip install esptool - ``` - - Erase flash on M5Stack: - ``` - esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash - ``` - - Download firmware to M5Stack: - ``` - esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash --flash_mode dio -z 0x1000 m5cloud-20180516-v0.4.0.bin - ``` - -### Connect Wi-Fi - - -Mobile Phone or PC connect to M5Stack AP(like `M5Stack-a67c`), and then open brower to login 192.168.4.1 setting your LAN SSID and Password - -![image](../../_static/M5Stack_MicroPython_UserGuidePictures/m5stack_connet_wifi.png) - -### Binding device - -*1.login http://io.m5stack.com and register your own account(or login your account)* - -*2. press `Device->Add` buttom on M5Cloud IDE for binding M5Stack board to your account* - -*3. Input the Check Code for the M5Stack screen display,Check Code is random, after 60s will refresh* - -![image](../../_static/M5Stack_MicroPython_UserGuidePictures/WebIDE_check_code.png) - -### Coding MicroPython - -*1. create a new python project* - -![image](../../_static/M5Stack_MicroPython_UserGuidePictures/create_a_new_project.png) - -*2. write your own code and press `Upload & Run` buttom on the M5Cloud IDE* - -copy below code to `main.py` file and press `Upload & Run` - -``` python -from m5stack import lcd - -lcd.clear() -lcd.setCursor(0, 0) -lcd.setColor(lcd.WHITE) - -lcd.print("Hello World!") - -``` - -![image](../../_static/M5Stack_MicroPython_UserGuidePictures/display_hello_world.png) - diff --git a/en/get-started/M5Stack_Core_Get_Started_Arduino_Mac_en.rst b/en/get-started/M5Stack_Core_Get_Started_Arduino_Mac_en.rst new file mode 100644 index 00000000..63f19d59 --- /dev/null +++ b/en/get-started/M5Stack_Core_Get_Started_Arduino_Mac_en.rst @@ -0,0 +1,148 @@ +M5Stack-Core Get Started(MacOS, Arduino) +======================================== + +CONTENT +~~~~~~~ + +1. `Setting Environment <#setting-environment>`__ + + - `1. Install Arduino IDE <#1-install-arduino-ide>`__ + + - `2. ESP32 Board Support <#2-esp32-board-support>`__ + + - `3. Install M5Stack Library <#3-install-m5stack-library>`__ + +2. `Upload an Example Sketch <#upload-an-example-sketch>`__ + +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 + +1. Install ``Arduino IDE`` +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you don't already have the Arduino IDE installed, make sure to +install it. You can download it here +https://www.arduino.cc/en/Main/Software + +.. figure:: ../../_static/getting_started_pics/m5stack_core/macOS_download_arduino_ide.png + :alt: image + + image +2. ESP32 Board Support +^^^^^^^^^^^^^^^^^^^^^^ + +Open Terminal (if you've never used the terminal before, it can be found +in Applications > Utilities > Terminal) and execute the following +command (copy->paste and hit enter): + +:: + + + mkdir -p ~/Documents/Arduino/hardware/espressif && \ + cd ~/Documents/Arduino/hardware/espressif && \ + git clone https://github.com/espressif/arduino-esp32.git esp32 && \ + cd esp32 && \ + git submodule update --init --recursive && \ + cd tools && \ + python get.py + +Where ~/Documents/Arduino represents your default sketch book location. +If you encounter any problems it could be that your Arduino sketchbook +folder is in a different location. This can be found by running arduino +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. + +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 +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Start up the Arduino IDE, then Select +``Sketch``->``Include Library``->``Manage Libraries...`` Type +``M5Stack`` into the search box, choose the library marked "Library for +M5Stack Core development kit" and install it. + +.. figure:: ../../_static/getting_started_pics/m5stack_core/macOS_install_m5stack_lib.png + :alt: image + + image +.. figure:: ../../_static/getting_started_pics/m5stack_core/macOS_search_m5stack.png + :alt: image + + image +Upload an Example Sketch +~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Select your board and the serial port +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +After connecting the M5 to your computer via the USB cable. Start up the +Arduino IDE, and click ``Tools -> Boards -> M5Stack-Core-ESP32`` to +select your board + +.. figure:: ../../_static/getting_started_pics/m5stack_core/macOS_select_board.png + :alt: image + + image +Click ``Tools -> Ports ->`` to select the serial port which your M5Stack +Core is connected to. It should be called something like +``/dev/cu.SLAB_USBtoUART`` + +.. figure:: ../../_static/getting_started_pics/m5stack_core/macOS_select_serial_port.png + :alt: image + + image +2. Select an example +~~~~~~~~~~~~~~~~~~~~ + +Click ``File-> Examples``. there are some test programs in ``M5Stack->`` + +Try to open a sketch called ``HelloWorld`` inside Basics. + +.. figure:: ../../_static/getting_started_pics/m5stack_core/macOS_select_example.png + :alt: image + + image +Compile and upload it, the M5Stack screen will show "Hello World!" + +.. figure:: ../../_static/getting_started_pics/m5stack_core/display_hello_world.png + :alt: image + + image +Note +~~~~ + +Although most versions of MacOS have no problem with detecting the COM +port, on some newer versions of High Sierra sometimes Slab\_USBtoUART +does not appear. If this is the case, after you connect the M5 open +``security and privacy`` in the system preferences and set it to +``permit``. + +.. figure:: ../../_static/getting_started_pics/m5stack_core/macOS_security_and_privacy.png + :alt: image + + image +.. figure:: ../../_static/getting_started_pics/m5stack_core/macOS_security_and_privacy_01.png + :alt: image + + image +.. figure:: ../../_static/getting_started_pics/m5stack_core/macOS_security_and_privacy_02.png + :alt: image + + image +***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\*\*\* diff --git a/en/get-started/get-started-M5StackCore-Arduino.rst b/en/get-started/M5Stack_Core_Get_Started_Arduino_Windows_en.rst similarity index 52% rename from en/get-started/get-started-M5StackCore-Arduino.rst rename to en/get-started/M5Stack_Core_Get_Started_Arduino_Windows_en.rst index ef7e31c9..0f936e01 100644 --- a/en/get-started/get-started-M5StackCore-Arduino.rst +++ b/en/get-started/M5Stack_Core_Get_Started_Arduino_Windows_en.rst @@ -1,25 +1,50 @@ -M5Stack-Core-Arduino —— Getting Started -======================================= +M5Stack-Core Get Started(Windows, Arduino) +========================================== -**Windows** ------------ +CONTENT +~~~~~~~ -1. install ``Arduino IDE`` +1. `Setting Environment <#setting-environment>`__ + + - `1. Install Arduino IDE <#1-install-arduino-ide>`__ + + - `2. Download Toolchain <#2-download-toolchain>`__ + + - `3. ESP32 Toolchain <#3-esp32-toolchain>`__ + + - `4. Download M5Stack Lib <#4-download-m5stack-lib>`__ + +2. `Example <#example>`__ + +Setting Environment +~~~~~~~~~~~~~~~~~~~ + +*Before setting the development environment, we suggest you confirm +whether the USB driver has installed. If not, please visit this link +``establish serial connection``.* + +1. Install ``Arduino IDE`` ^^^^^^^^^^^^^^^^^^^^^^^^^^ *download address* https://www.arduino.cc/en/Main/Software -.. image:: ../../_static/screenshots/arduino_cc_package.png - +.. figure:: ../../_static/screenshots/arduino_cc_package.png + :alt: image + + image modified the path of Arduino as ``D:\Program Files`` as shown below -.. image:: ../../_static/screenshots/select_arduino_install_path.png - +.. figure:: ../../_static/screenshots/select_arduino_install_path.png + :alt: image + + image Now my path of Arduino is ``D:\Program Files\Arduino`` -.. image:: ../../_static/screenshots/arduino_path.png - -2. Download toolchain +.. figure:: ../../_static/screenshots/arduino_path.png + :alt: image + + image +2. Download Toolchain ^^^^^^^^^^^^^^^^^^^^^ (Now my path of Arduino is ``D:\Program Files\Arduino``\ ) @@ -32,40 +57,52 @@ directory named ``espressif``, then enter this directory mkdir espressif && cd espressif -.. image:: ../../_static/screenshots/mkdir_espressif.png - +.. figure:: ../../_static/screenshots/mkdir_espressif.png + :alt: image + + image - clone ``esp32 idf`` at the directory named ``esp32`` git clone --recursive https://github.com/espressif/arduino-esp32.git esp32 -.. image:: ../../_static/screenshots/download_idf.png - -3. ESP32 toolchain +.. figure:: ../../_static/screenshots/download_idf.png + :alt: image + + image +3. ESP32 Toolchain ^^^^^^^^^^^^^^^^^^ Enter the path ``D:\Program Files\arduino\hardware\espressif\esp32\tools`` double click on ``get.exe`` -.. image:: ../../_static/screenshots/select_get_exe_file.png - -.. image:: ../../_static/screenshots/download_xtensa_tools.png - +.. figure:: ../../_static/screenshots/select_get_exe_file.png + :alt: image + + image +.. figure:: ../../_static/screenshots/download_xtensa_tools.png + :alt: image + + image 4. Download the M5Stack Lib via Arduino IDE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Open Arduino IDE, then Select -``Sketch`` -> ``Include Library`` -> ``Manage Libraries...`` Search +``Sketch``->``Include Library``->``Manage Libraries...`` Search ``M5Stack`` and install it -.. image:: ../../_static/screenshots/select_arduino_lib.png - -.. image:: ../../_static/screenshots/download_m5stack_lib.png - +.. figure:: ../../_static/screenshots/select_arduino_lib.png + :alt: image + + image +.. figure:: ../../_static/screenshots/download_m5stack_lib.png + :alt: image + + image Example -------- +~~~~~~~ The USB cable connects to M5Stack Core, then select your serial port which is connected M5Stack Core. Select a demo example, compile and @@ -74,17 +111,23 @@ upload 1. Open a example likes ``FactoryTest.ino`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. image:: ../../_static/screenshots/select_demo.png - +.. figure:: ../../_static/screenshots/select_demo.png + :alt: image + + image Comfire your board name, baudrate, the specified serial port: M5Stack-Core-ESP32、921600、COM3 -.. image:: ../../_static/screenshots/select_board_and_com.png - +.. figure:: ../../_static/screenshots/select_board_and_com.png + :alt: image + + image After upload seccessfully, open the Serial Monitor -.. image:: ../../_static/screenshots/FactoryTest_result.png - +.. figure:: ../../_static/screenshots/FactoryTest_result.png + :alt: image + + image 2. New a M5Stack program ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/en/get-started/get-started-M5StackCore-Micropython.rst b/en/get-started/M5Stack_Core_Get_Started_MicroPython_Windows_en.rst similarity index 53% rename from en/get-started/get-started-M5StackCore-Micropython.rst rename to en/get-started/M5Stack_Core_Get_Started_MicroPython_Windows_en.rst index effb40ce..b7afcba2 100644 --- a/en/get-started/get-started-M5StackCore-Micropython.rst +++ b/en/get-started/M5Stack_Core_Get_Started_MicroPython_Windows_en.rst @@ -1,8 +1,23 @@ -M5Stack-Core-MicroPython —— Getting Started -============================================ +M5Stack-Core Get Started(Windows, MicroPython) +============================================== + +CONTENT +~~~~~~~ + +1. `Burn Firmware <#Burn-Firmwared>`__ + + - `1. Download Firmware <#1-download-firmware>`__ + + - `2. Burn to M5Stack <#2-Burn-to-M5Stack>`__ + +2. `Connect Wi-Fi <#connect-wi-fi>`__ + +3. `Binding device <#binding-device>`__ + +4. `Coding MicroPython <#coding-micropython>`__ Burn Firmware -------------- +~~~~~~~~~~~~~ 1. Download Firmware ^^^^^^^^^^^^^^^^^^^^ @@ -15,20 +30,13 @@ Now, the M5Cloud firmware I downloaded named 2. Burn to M5Stack ^^^^^^^^^^^^^^^^^^ -+--------------+--------------+--------------+ -| |windows| | |linux| | |macos| | -+--------------+--------------+--------------+ -| Windows | Linux | Mac OS | -+--------------+--------------+--------------+ ++-----------+-----------+-----------+ +| |image| | |image| | |image| | ++===========+===========+===========+ +| Windows | Linux | MacOS | ++-----------+-----------+-----------+ -.. |windows| image:: ../../_static/windows-logo.png - -.. |Linux| image:: ../../_static/linux-logo.png - -.. |MacOS| image:: ../../_static/macos-logo.png - - -**Windows** +***Windows*** open Flash Download Tools(\ `点击下载 `__) @@ -36,34 +44,54 @@ apply by Espressif, choose ``ESP32 DownloadTool`` option and execute three steps ( *choose firmware file, your serial port, erase and program flash* ) as shown below -.. image:: ../../_static/M5Stack_MicroPython_UserGuidePictures/windows_download_firmware.png +.. figure:: ../../_static/M5Stack_MicroPython_UserGuidePictures/windows_download_firmware.png + :alt: image -**MacOS/Linux** + image +***MacOS/Linux*** -*Comfire which serial port connected with* -TODO: linked to `Establish **serial** connection` +*1. Check port on Linux and MacOS* -*Download M5Cloud firmware to M5Stack board* - Installing esptool: +To check the device name for the serial port of your M5Stack board (or +external converter dongle), run this command two times, first with the +board / dongle unplugged, then with plugged in. The port which appears +the second time is the one you need: + +Linux + +``ls /dev/tty*`` + +MacOS + +``ls /dev/cu.*`` + +*2. Adding user to ``dialout`` on Linux* + +The currently logged user should have read and write access the serial +port over USB. On most Linux distributions, this is done by adding the +user to ``dialout`` group with the following command: + +``sudo usermod -a -G dialout $USER`` Now, my serial port named +``ttyUSB0`` + +*3. Download M5Cloud firmware to M5Stack board* - Installing esptool: ``pip install esptool`` - Erase flash on M5Stack: ``esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash`` - Download -firmware to M5Stack +firmware to M5Stack: ``esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash --flash_mode dio -z 0x1000 m5cloud-20180516-v0.4.0.bin`` Connect Wi-Fi -------------- +~~~~~~~~~~~~~ Mobile Phone or PC connect to M5Stack AP(like ``M5Stack-a67c``), and then open brower to login 192.168.4.1 setting your LAN SSID and Password .. figure:: ../../_static/M5Stack_MicroPython_UserGuidePictures/m5stack_connet_wifi.png - :align: center - :alt: m5stack_connet_wifi - :figclass: align-center - - m5stack_connet_wifi + :alt: image + image Binding device ---------------- +~~~~~~~~~~~~~~ *1.login http://io.m5stack.com and register your own account(or login your account)* @@ -75,18 +103,18 @@ board to your account* random, after 60s will refresh* .. figure:: ../../_static/M5Stack_MicroPython_UserGuidePictures/WebIDE_check_code.png - :align: center :alt: image + image Coding MicroPython -------------------- +~~~~~~~~~~~~~~~~~~ *1. create a new python project* .. figure:: ../../_static/M5Stack_MicroPython_UserGuidePictures/create_a_new_project.png - :align: center :alt: image + image *2. write your own code and press ``Upload & Run`` buttom on the M5Cloud IDE* @@ -103,8 +131,10 @@ copy below code to ``main.py`` file and press ``Upload & Run`` lcd.print("Hello World!") .. figure:: ../../_static/M5Stack_MicroPython_UserGuidePictures/display_hello_world.png - :align: center :alt: image + image - +.. |image| image:: ../../_static/windows-logo.png +.. |image| image:: ../../_static/linux-logo.png +.. |image| image:: ../../_static/macos-logo.png diff --git a/en/get-started/get-started-M5StackCore-Arduino.md b/en/get-started/get-started-M5StackCore-Arduino.md deleted file mode 100644 index e69de29b..00000000 diff --git a/en/get-started/index.rst b/en/get-started/index.rst index 35f0c462..8d12eba1 100644 --- a/en/get-started/index.rst +++ b/en/get-started/index.rst @@ -2,7 +2,7 @@ Get Started *********** -This document is intended to help users set up the software environment for development of applications. Through a simple example we would like to illustrate how to develop M5Stack boards, firmware(`Arduino IDE`) or source files(`Micropython`) download to M5Stack boards. +This document is intended to help users set up the software environment for development of applications. Through a simple example we would like to illustrate how to develop M5Stack boards, firmware(`Arduino IDE`) or source files(`Micropython`) download to M5Stack boards. Introduction @@ -15,7 +15,7 @@ What You Need To develop applications for M5Stack Core you need: * **PC** loaded with either Windows, Linux or Mac operating system -* a **M5Stack Core** with Type-C cable +* a **M5Stack Core** with Type-C cable Your boards @@ -35,13 +35,13 @@ If you have one of ESP32 development boards listed below, click the correspondin .. |Core with Arduino| image:: ../../_static/pics/m5-arduino.jpg -.. _Core with Arduino: get-started-M5StackCore-Arduino.html +.. _Core with Arduino: M5Stack_Core_Get_Started_Arduino_Windows_en.html .. |Core with Micropython| image:: ../../_static/pics/m5-micropython.jpg -.. _Core with Micropython: get-started-M5StackCore-Micropython.html +.. _Core with Micropython: M5Stack_Core_Get_Started_MicroPython_Windows_en.html .. |M5GO| image:: ../../_static/pics/M5GO.jpg -.. _M5GO: get-started-M5StackCore-Micropython.html +.. _M5GO: M5Stack_Core_Get_Started_MicroPython_Windows_en.html .. |ESP32CAM| image:: ../../_static/pics/ESP32CAM.jpg .. _ESP32CAM: get-started-ESP32CAM.html @@ -57,15 +57,15 @@ If you have one of ESP32 development boards listed below, click the correspondin :maxdepth: 1 :hidden: - M5Stack Core with Arduino IDE - M5Stack Core with Micropython - M5GO + M5Stack Core with Arduino IDE + M5Stack Core with Micropython + M5GO ESP32CAM M5Stack STEPMOTOR Module M5Bala - - - + + + Related Documents ================= @@ -73,5 +73,4 @@ Related Documents .. toctree:: :maxdepth: 1 - establish-serial-connection - + establish_serial_connection diff --git a/en/get-started/make-project.rst b/en/get-started/make-project.rst deleted file mode 100644 index c7cba3bc..00000000 --- a/en/get-started/make-project.rst +++ /dev/null @@ -1,74 +0,0 @@ -Build and Flash with Make -========================= -`zh_CN:[中文]` - - -Finding a project ------------------ - -As well as the `esp-idf-template `_ project, ESP-IDF comes with some example projects on github in the `examples` directory. - -Once you've found the project you want to work with, change to its directory and you can configure and build it. - - -Configuring your project ------------------------- - -:: - - make menuconfig - - -Compiling your project ----------------------- - -:: - - make all - -... will compile app, bootloader and generate a partition table based on the config. - - -Flashing your project ---------------------- - -When ``make all`` finishes, it will print a command line to use esptool.py to flash the chip. However you can also do this from make by running:: - - make flash - -This will flash the entire project (app, bootloader and partition table) to a new chip. The settings for serial port flashing can be configured with `make menuconfig`. - -You don't need to run ``make all`` before running ``make flash``, ``make flash`` will automatically rebuild anything which needs it. - - -Compiling & Flashing Just the App ---------------------------------- - -After the initial flash, you may just want to build and flash just your app, not the bootloader and partition table: - -* ``make app`` - build just the app. -* ``make app-flash`` - flash just the app. - -``make app-flash`` will automatically rebuild the app if it needs it. - -There's no downside to reflashing the bootloader and partition table each time, if they haven't changed. - - -The Partition Table -------------------- - -Once you've compiled your project, the "build" directory will contain a binary file with a name like "my_app.bin". This is an ESP32 image binary that can be loaded by the bootloader. - -A single ESP32's flash can contain multiple apps, as well as many kinds of data (calibration data, filesystems, parameter storage, etc). For this reason, a partition table is flashed to offset 0x8000 in the flash. - -Each entry in the partition table has a name (label), type (app, data, or something else), subtype and the offset in flash where the partition is loaded. - -The simplest way to use the partition table is to `make menuconfig` and choose one of the simple predefined partition tables: - -* "Single factory app, no OTA" -* "Factory app, two OTA definitions" - -In both cases the factory app is flashed at offset 0x10000. If you `make partition_table` then it will print a summary of the partition table. - -For more details about :doc:`partition tables <../api-guides/partition-tables>` and how to create custom variations, view the :doc:`documentation <../api-guides/partition-tables>`. - diff --git a/en/get-started/toolchain-setup-scratch.rst b/en/get-started/toolchain-setup-scratch.rst deleted file mode 100644 index c5f2b5ae..00000000 --- a/en/get-started/toolchain-setup-scratch.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. _get-started-customized-setup: - -***************************** -Customized Setup of Toolchain -***************************** - -Instead of downloading binary toolchain from Espressif website (see :ref:`get-started-setup-toolchain`) you may build the toolchain yourself. - -If you can't think of a reason why you need to build it yourself, then probably it's better to stick with the binary version. However, here are some of the reasons why you might want to compile it from source: - -- if you want to customize toolchain build configuration -- if you want to use a different GCC version (such as 4.8.5) -- if you want to hack gcc or newlib or libstdc++ -- if you are curious and/or have time to spare -- if you don't trust binaries downloaded from the Internet - -In any case, here are the instructions to compile the toolchain yourself. - -.. toctree:: - :maxdepth: 1 - - windows-setup-scratch - linux-setup-scratch - macos-setup-scratch -