Difference between revisions of "How to use microPyhton"

From Banana Pi Wiki
Jump to: navigation, search
(Created page with "===uPyCraft(microPyhton)=== 1,first open the uPyCraft software, click the Tools->Serial port to select the port in the upper toolbar. After selecting port, the software...")
 
Line 27: Line 27:
  
 
Basic function test:
 
Basic function test:
 
 
You can visit GitHub to download the test code, compile, burn, and observe the test results through the serial port.
 
You can visit GitHub to download the test code, compile, burn, and observe the test results through the serial port.
 
   
 
   
 
Project link \(PlatformIO\):https://github.com/yelvlab/BPI-UNO32/tree/master/Test_Code/PlatformIO_VSCode
 
Project link \(PlatformIO\):https://github.com/yelvlab/BPI-UNO32/tree/master/Test_Code/PlatformIO_VSCode
 
 
* Arduino IDE:Open File -> Preferences, as shown in the following figure:
 
[[File:Uno32_pic_1.png]]
 
 
* Click the button in the red circle above and add the following URL in the newly popped
 
::window:https://git.oschina.net/dfrobot/FireBeetle-ESP32/raw/master/package\_esp32\_index.json
 
::As shown below:
 
 
[[File:Uno32_pic_2.png]]
 
 
* Open Tools->Board->Board Manager. Pull down to see FireBeetle-ESP32 and click Install.Please select the relevant model after installation.
 
 
[[File:Uno32_pic_3.png]]
 
 
* Open a project in the upper left corner of the file, or open an example.
 
 
[[File:Uno32_pic_4.png]]
 
 
* Select a correct port in Tools -> Ports, then click ”compile"will be compiled code,clickwill "run" be burn program。
 
 
[[File:Uno32_pic_5.png]]
 
 
[[File:Uno32_pic_6.png]]
 
 
*PlatformIO for Atom/VS Code
 
 
 
1,First open the PlatformIO Home page, then click Open Project to open the project. \(You can choose the test code.\) If you write your own code to burn, then the platformio.ini file should write the following code
 
 
[env:BPI-uno32]
 
platform = espressif32
 
board = nodemcu-32s
 
framework = arduino
 
 
[[File:Uno32_pic_7.png]]
 
 
[[File:Uno32_pic_8.png]]
 
 
2,The code path under PlatformIO project is generally src/main.cpp. Open the code and use Ctrl+\` to open the terminal debugger. Enter platformio run --target upload.
 
[[File:Uno32_pic_9.png]]
 
 
3,Make sure the board is connected. The program will be compiled first and then burned into the BPI-uno32 board. There are some points to note. If the above code does not specify the port, please try to avoid other serial devices connected on the computer. For serial port numbers, run platformio --help.
 
 
[[File:Uno32_pic_10.png]]
 

Revision as of 19:53, 26 August 2018

uPyCraft(microPyhton)

1,first open the uPyCraft software, click the Tools->Serial port to select the port in the upper toolbar. After selecting port, the software will automatically decide whether to burn the firmware, if necessary, the interface will be popped up.

uPyCraft(microPyhton):

  • first open the uPyCraft software, click the Tools->Serial port to select the port in the upper toolbar. After selecting port, the software will automatically decide whether to burn the firmware, if necessary, the interface will be popped up.

Uno32 pic 11.png

2,when the software interface is opened, we choose ESP32 in board. If erase\_flash chooses yes, it will wipe out the original flash first, and generally choose to erase it, so that the original flash will have an impact on it now.

Uno32 pic 12.png

3, after the selection, click Yes to start the burning, there will be the following dialog, only to wait for it.

Uno32 pic 13.png

when the Burn column is full, the dialog box automatically closes and displays the software master interface.

Uno32 pic 14.png

4,In the main interface we can clickto “connect" connected. It is located in the lower row of the toolbar. The following interface will appear after the connection

Uno32 pic 15.png

This means we can appear > > > for interactive programming like to Python in the following dialogue.

Basic function test: You can visit GitHub to download the test code, compile, burn, and observe the test results through the serial port.

Project link \(PlatformIO\):https://github.com/yelvlab/BPI-UNO32/tree/master/Test_Code/PlatformIO_VSCode