1.EasyLoader is a simple and fast program burner, and each product page has a product-related case program for EasyLoader.For users who don't need to customize the firmware or perform other operations, using EasyLoader to burn firmware for M5StickV is the simplest solution.(Currently EasyLoader is only available for Windows OS)
2.After downloading the software, double-click to run the application, connect the M5 device to the computer via the data cable, select the port parameters, and click "Burn" to start burning.
Users who use an operating system other than Windows or who need to specify a burning file can use Kflash for firmware burning. Click the link below to download the firmware.
When connected, it will automatically enter Maixpy UI. Now the device is runing the default code, you can terminate it by "Ctrl+C".
The language shell programm(REPL) is good for instant code validatation, it can be used at short code programming and validation. In real project where we will have massive amount of code, in that case we will need a Code Editor for better orgnization of the code files.
Inside MaixPy,integrates a open source Editor Micropython Editor(pye) ,which is convenient for us to manage the code.
os.listdir() is for checking the files in current directory.
pye("hello.py"), you can create new files and enter editing mode(if file exist, only enter editting mode)
click for more
If editing finished, you can do
Enter to save the script.
Ctrl+Q to exit edit mode.
Notice： This editor have some requiremnt on the Serial tool, KEY
BackSpace have to set as
BackSpace will implement the same function as
os.chdir() is used for switch current directory to a certain directory, for example
You can see the output:
In this way, it is simple and handy, but thers something worth your attention,
import can only be utilized once, the second time
import won't work. If you need to use
import mutiple times, please refers to solution 2 below
with open("hello.py") as f: exec(f.read())
System will create a
boot.py file at directory
/sd , it will run this script after power on, modify this file will realize the AutoRun.
MaixPy IDE can easily realize real-time editing, uploading, execution, and real-time monitoring of camera images, file transfer and other functions. Using MaixPy IDE, because data compression and transmission require a part of resources, performance will be reduced, but This is a great development tool for developers who are not demanding in performance or who are in the debugging phase.
Windows platform can directly double-click the exe file to run the installer.
Linux command line to run permissions, then execute commands
chmod +x maixpy-ide-linux-x86_64-0.2.2.run
Run the MaixPy IDE, click on the toolbar, select the model of the development board.
M5StickV (Tools -> Select Development Board)
Click the Connect button in the lower left corner and select the correct connection port, click OK.
When the connection button changes from green to red, it has been connected successfully. You can edit the code in the edit box above. Click the Run button in the lower left corner to execute the code and verify it.
The firmware has a built-in WS2812 RGB LED driver library. The following is a reference routine. Note: Since the expansion port of UnitV does not have a driving load function, this program is only suitable for driving the built-in RGB LED:
from modules import ws2812 from fpioa_manager import * fm.register(8) class_ws2812 = ws2812(8,100) r=0 dir = True while True: if dir: r += 5 else: r -= 5 if r>=255: r = 255 dir = False elif r<0: r = 0 dir = True for i in range(100): a = class_ws2812.set_led(i,(0,0,r)) a=class_ws2812.display()
In the library documentation, you can find more APIs to help you build a variety of applications。