当前位置:网站首页>How to use maixll dock

How to use maixll dock

2022-07-01 04:24:00 Salted fish shell


Cough , We installed the image system above . The problem is coming. , How to use it? ?
This article talks about two simple ways to use V831
We use IDE To show some simple effects .
Serial port tools let's do offline debugging .


MaixPy3 IDE

MaixPy3 IDE be based on jupyter Realized Python3 Integrated development environment (IDE,Integrated Development Environment ), It is intended to help users write Python After the language code , The user runs the... Provided by the developer jupyter notebook After the documents , After connecting the hardware, click 【 function 】 The following effect pictures can be presented in real time .

 Insert picture description here

install MaixPy3 IDE

IDE Download address
 Insert picture description here
Unpack the installation
 Insert picture description here
installed , Desktop generation IDE Icon
 Insert picture description here
open IDE
 Insert picture description here
You will find ,U Pan ?!( No, U The appearance of the disk is equal to ADB There's something wrong with the drive , This is not connected IDE Of )
At this time, you need to uninstall manually according to the following figure Android ADB Interface Mobile phone driver
【 My computer 】 Right click 【 attribute 】【 Device manager 】
 Insert picture description here
There is nothing to say about uninstalling directly
 Insert picture description here
If U The disk still does not appear as in the above steps , Try a different mouth , Restart the equipment after burning the system again or consider changing a computer .

this time OK 了 .
 Insert picture description here

Use MaixPy3 IDE

IDE After opening, there is a web page file and a console adb Let's look at the web page first jupyter

stay Jupyter In the documentation you can step through the code , And keep the output , It can also keep the content displayed on the screen .
The features of the software are as follows :

  • adopt TCP/IP Connect the development board , Support running on this computer Python Code , Real time feedback of the running results or pictures of the development board .
  • adopt jupyter notebook Documents can save the results of each run , Facilitate the dissemination of knowledge .
  • Inherit ipython Realization Python Highlighting and completion of grammar ( Can press tab To complete ).

It has nothing to do with us doge

open IDE A web page will appear jupyter
 Insert picture description here
choice 【New】【RPyc-Python】( Switch the kernel to Rpyc-python)
 Insert picture description here
test : Input print(666) Click on the run (python The foundation must be a little )
 Insert picture description here You can also enter the following code to test

import platform
print(platform.platform())

import time
print(time.asctime())

 Insert picture description here

The above results show that :
One 、 The time this code runs is [ rpyc-kernel ]( running at Wed Apr 27 09:45:07 2022 )
Two 、 The platform on which this code runs is Linux-4.9.118-armv7l-with-libc
3、 ... and 、 This time running this code , The board subsystem time is Wed Apr 27 01:45:07 2022. This is a time zone difference , If you are interested, change it to GMT+8 It can be matched

When the code is running at the current time , And print out the above code , It indicates that the development board has been connected and can be used normally

wuhu

Then light the lamp , If we can light it up, we'll get it done

from maix import gpio
import time
ph7 = gpio.gpio(7, "H", 1)   #  Definition GPIO 

while True:
    ph7.set_value(0)
    print(ph7.get_value())
    time.sleep(1)
    ph7.set_value(1)
    print(ph7.get_value())
    time.sleep(1)

 Insert picture description here
LED The light flashes three times , Do you understand . Here we can run directly to see the effect . Now we exit IDE( There is a in the lower right corner of the computer IDE The icon , Right click to exit )
 Insert picture description here
Then open the main.py, No change . So if you want to run offline , Put the program in main.py Keep it in .IDE It's just for testing and demonstration .
 Insert picture description here

A serial port

It uses IDE after , I feel the effect is good , Suitable for displaying effects .
In fact, the hardware plays a lot , I prefer this interactive serial port function , Let's introduce one . Use whatever you like in the back ~
Let's choose a serial port tool ——MobaXterm( No connection , Baidu has ..)

MobaXterm Is the ultimate toolkit for remote computing , It is mainly used for Windows Enhanced terminal for , with X11 The server 、 Tabbed SSH client 、 Network tools, etc . In a Windows In the application , It provides a lot for programmers 、 Webmaster 、it Customized functions for administrators and almost all users who need to process remote jobs in a simpler way .
MobaXterm Provides all important remote networking tools (SSH、X11、RDP、VNC、FTP、MOSH etc. ) and Unix command (bash,ls,cat,sed,grep,awk,rsync,…) To Windows desktop , In a single portable exe Documents are available out of the box .

Usage method

  1. take Type-c Access to USB UART On
     Insert picture description here

  2. Check the port number in Device Manager

 Insert picture description here
No port number , Find the problem as shown in the figure above , You need to download the driver .
V831 The serial driver of is CH340 Just Baidu next .  Insert picture description here
After installation, the problem is solved

 Insert picture description here
3. open MobaXterm, choice 【 conversation 】【 A serial port 】【 Serial port 】【115200】【 well 】
 Insert picture description here
4. There is !( If nothing starts , Then press enter twice )

 Insert picture description here
6. test : Input python Can enter the python Interactive compiler .
 Insert picture description here
7. Encourage yourself to enter :print(“ I am great. ”)
 Insert picture description here
Come here first , This article is written for friends who have no foundation . So step by step

Turn off the serial port tool . We will mainly use it for offline debugging later ~.

Digression : How to ask questions gracefully

Official group , There are various players , All kinds of boards . If you want to solve problems quickly, you need to know some skills .

Here is a hint of how Mengxin should ask questions gracefully .( Of course, money can quickly solve the problem , Cough )

  1. First explain the board you use and its status
    for example : I'm using XX Family V831, Installed XX Mirror image ,maixpy The version is XX
  2. Take photos to illustrate the problem , And trying methods .
    ( Some simple mistakes Baidu can solve , It's a waste of time to ask .)
    such as : I installed. IDE, But there is no U disc , The interleaver is shown below . According to the official ( terms of settlement ) The document operation , Uninstalled ADB, Not yet. .
     Insert picture description here
  3. What kind of effect do you want .
    for example : I want to connect this interposer V831, And show me V831 Of U disc
  4. Polite language
    Such as : Is there a handsome big man who can save the children (doge)
  5. It is necessary to generate documents after solving , Help more cute new friends
    Such as : Can't initialize Photoshop Because the temporary storage disk is full
原网站

版权声明
本文为[Salted fish shell]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/182/202207010419254743.html