Basic

1. MaixPy IDE

../_images/zza.png

1.1 Download IDE

MaixPy IDE

1.2 Steps:

Open the IDE and select the model of the development board in the upper toolbar.

../_images/ide.jpg
  • 选择 工具(Tool) ->

  • 鼠标 选择开发板(Select board) ->

  • 点击 T-Watch

3. T-Watch Example

import lcd                                  #import LCD screen library
import time                                 #import time time library
import sensor                               #import sensor camera sensor library
from Maix import GPIO                       #import the GPIO function of Maix module, divided into general and high-speed
from fpioa_manager import *                 #import all of the module fpioa_manager, abbreviated as fm

#Turn on the screen backlight, please refer to turning on the LED light 1. The principle of LED.py is the same
fm.register(board_info.PIN17,fm.fpioa.GPIO0)
led=GPIO(GPIO.GPIO0,GPIO.OUT)
led.value(1)                                #1: Turn on the backlight 0: Turn off the backlight

lcd.init(freq=15000000)                     #LCD screen initialization operating frequency 15M
lcd.rotation(2)                             #LCD rotation mode setting 2: up 0: down 1: left 0: right

sensor.reset()                              #camera reset initialization
sensor.set_pixformat(sensor.RGB565)         #camera image format RGB565 16 bits/pixel
sensor.set_framesize(sensor.QVGA)           #camera image frame size QVGA
sensor.skip_frames(time=2000)               #the frame skipping time of the camera is 2 seconds so that the image is transmitted to the screen stably

while(True): #while infinite loop execution
    img = sensor.snapshot()                 #The camera gets the image data and assigns it to the variable img(image)
    lcd.display(img)                        #LCD screen displays camera img image frame by frame

3.1 Download firmware: