Maix Bit series experience - Preparation of development environment

Posted by PHPFreaksMaster on Tue, 18 Jan 2022 06:51:31 +0100

Author: AXYZdong Automation Engineering Male
A little thinking, a little thinking, a little rationality!
Set a small goal and try to become a habit! Meet better yourself in the most beautiful years!
CSDN@AXYZdong , CSDN launch, axyzdong original
The only blog update address is: 👉 AXYZdong's blog 👈
The homepage of station B is: AXYZdong's personal home page


preface

This paper briefly introduces the preparation process of development environment, and focuses on the problems encountered in the preparation process and solutions.

This article is mainly about the experience of Maix Bit learning series. See the specific environment: MaixPy document

1, Install USB driver

In fact, most development boards need to install relevant serial drivers before connecting with the computer in order to communicate with the computer normally. The most common should be the CH340 serial driver chip. The old version of Maix Bit uses the CH340 serial driver chip, while the new version of Maix Bit uses the CH552 serial driver chip.

Before installing the driver, you can know what type of serial driver chip your Maix Bit uses.

For specific driver installation, refer to MaixPy document: Maix Bit USB driver installation

2, Update MaixPy firmware

Before updating the firmware, ensure that the USB driver is successfully installed

Download: kflash_gui

â–² the version at that time was v1 six point seven


Download kflash for Windows_ gui_ v1. 6.7_ Windows. 7z, unzip and run kflash_gui.exe

Get firmware: github

I installed: maixpy_v0.5.0_125_gd4bdb25.bin

3, MaixPy IDE installation

The MaixPy documentation provides two methods, one is to download the installer and the other is to download the compressed package. I've tried both. You don't need to install the compressed package. There are directly installed ones in it. Double click maixpyide to run it.

When you open the MaixPy IDE, a demo will automatically appear

# Hello World Example
#
# Welcome to the MaixPy IDE!
# 1. Conenct board to computer
# 2. Select board at the top of MaixPy IDE: `tools->Select Board`
# 3. Click the connect buttion below to connect board
# 4. Click on the green run arrow button below to run the script!

import sensor, image, time, lcd

lcd.init(freq=15000000)
sensor.reset()                      # Reset and initialize the sensor. It will
                                    # run automatically, call sensor.run(0) to stop
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA)   # Set frame size to QVGA (320x240)
sensor.skip_frames(time = 2000)     # Wait for settings take effect.
clock = time.clock()                # Create a clock object to track the FPS.

while(True):
    clock.tick()                    # Update the FPS clock.
    img = sensor.snapshot()         # Take a picture and return the image.
    lcd.display(img)                # Display on LCD
    print(clock.fps())              # Note: MaixPy's Cam runs about half as fast when connected
                                    # to the IDE. The FPS should increase once disconnected.

Then follow the method in the MaixPy document: tools → \to → select development board → \to → connect MaixPy IDE

Click Run to display:



Prompt:

Traceback (most recent call last):
  File "<stdin>", line 12, in <module>
OSError: Reset Failed
MicroPython v0.5.0-123-g859098d on 2020-08-18; Sipeed_M1 with kendryte-k210
Type "help()" for more information.

Found on the Forum [solution]

It turned out that the camera was not installed on the development board. No, I won't open the black cover and fight it directly.

â–² correct posture for installing camera and screen

When the image appears on the screen, it indicates that the construction of your development environment has been basically completed.

summary

  • Read Maix Py documents
  • Learn to solve problems. If Baidu can't find them, you can seek relevant technical forums
  • Wonderful world in the Forum Sided Chinese Forum

reference

[1]: MaixPy document
[2]: https://cn.bbs.sipeed.com/d/27-lcd-maix-dock


  that's all for this sharing

If my blog is helpful to you and you like my blog content, please click "like", "collect" and "pay attention" for three times!
For more highlights, please go to AXYZdong's blog

If there are any errors or inaccuracies in the above content, please click below 👇 Leave a message. Or you have better ideas. Welcome to exchange and study together~~~

Topics: Python AI Object Detection