Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 4082|回复: 7

Maix Bit K210学习教程

[复制链接]

399

主题

1251

帖子

4020

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4020
发表于 2023-12-27 16:30:41 | 显示全部楼层 |阅读模式
1.写在前面
板子比较脆弱,尤其是排线(就是连着摄像头、显示屏的那两根软线),一旦固定好了,不要来扭动

2.组装
2.1 螺母(那几个白色塑料的小圈)本身比较紧,建议先用螺丝拧一下,后面好拧
2.2 安装摄像头的时候一定要把排线的卡扣抠起来,再插入排线,再把卡扣按下去,完成安装
2.3 先吧螺丝拧一下螺母,固定一下(不要拧紧)
2.4 摄像头固定孔对号螺丝,拧紧
2.5 同步骤2.2安装好显示屏


3。安装 MaixPy IDE

3.1 下载
链接:https://pan.baidu.com/s/17jjJU1bwoZWXUx-hJtqsEA?pwd=ri1t
提取码:ri1t



3.2 安装



4.连接板子
4.1.用usb插到电脑
4.2.打开电脑设备管理器,查看端口号,比如USB-Serial-Port(COM4),那说明你连接的是你的com4端口。
4.3.打开 MaixPy IDE,点击工具--选择开发板-->Sipeed Maix Bit(With Mic)
4.4.点击左下角的连接(像链条)符号,选择4.2步骤中查到的端口号,连接成功后左下角的圆圈符号变成红色。

5.运行代码
点击左下角的绿色圆圈符号,会运行当前默认打开的helloworld代码,会在电脑上和lcd屏幕上显示





参考资料:https://wiki.sipeed.com/news/Mai ... =%E9%81%BF%E5%9D%91

https://blog.csdn.net/csdn_rp/article/details/119730986




回复

使用道具 举报

399

主题

1251

帖子

4020

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4020
 楼主| 发表于 2023-12-29 14:27:14 | 显示全部楼层
这是默认的helloword代码,解释的很到位,看不懂可以翻一下后面的英语注释
  1. import sensor, image, time, lcd

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

  9. while(True):
  10.     clock.tick()                    # Update the FPS clock.
  11.     img = sensor.snapshot()         # Take a picture and return the image.
复制代码
回复

使用道具 举报

399

主题

1251

帖子

4020

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4020
 楼主| 发表于 2024-1-6 18:00:32 | 显示全部楼层
专题1:如何在屏幕中做标记?
  1. import sensor, image, time, lcd

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

  9. while(True):
  10.     clock.tick()                    # Update the FPS clock.
  11.     img = sensor.snapshot()         # Take a picture and return the image.
  12.     img.draw_line(50,50,150,50,(255,255,255),2)
  13.     lcd.display(img)                # Display on LCD
  14.     print(clock.fps())              # Note: MaixPy's Cam runs about half as fast when connected
  15.                                     # to the IDE. The FPS should increase once disconnected.
复制代码
回复

使用道具 举报

399

主题

1251

帖子

4020

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4020
 楼主| 发表于 2024-1-6 18:04:04 | 显示全部楼层
上句中的核心语句是
img.draw_line(50,50,150,50,(255,255,255),2)

img是image图像的缩写
draw line就是划线
6个参数,前面4个分别是两个端点的xy坐标,第五个是颜色(三个分量分别表示rgb),第6个是粗细
回复

使用道具 举报

399

主题

1251

帖子

4020

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4020
 楼主| 发表于 2024-1-6 18:05:01 | 显示全部楼层
同理,还有draw_circle绘制圆形等函数,
在软件中输入img.draw。。后,它会提示所有的相关函数,根据需要选择即可。
回复

使用道具 举报

399

主题

1251

帖子

4020

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4020
 楼主| 发表于 2024-1-6 18:06:52 | 显示全部楼层
专题2,如何标记色块
  1. import sensor, image, time, lcd

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

  9. while(True):
  10.     clock.tick()                    # Update the FPS clock.
  11.     img = sensor.snapshot()         # Take a picture and return the image.
  12.     green_threshold = (0, 80,-70, -10,-0,30)
  13.     blobs = img.find_blobs([green_threshold])
  14.     if blobs:
  15.         for b in blobs:
  16.             tmp=img.draw_rectangle(b[0:4])
  17.             tmp=img.draw_cross(b[5], b[6])
  18.             c=img.get_pixel(b[5], b[6])
  19.     lcd.display(img)                # Display on LCD
  20.     print(clock.fps())              # Note: MaixPy's Cam runs about half as fast when connected
  21.                                     # to the IDE. The FPS should increase once disconnected.
复制代码
回复

使用道具 举报

399

主题

1251

帖子

4020

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4020
 楼主| 发表于 2024-1-6 18:34:22 | 显示全部楼层
回复

使用道具 举报

399

主题

1251

帖子

4020

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4020
 楼主| 发表于 2024-1-6 18:35:33 | 显示全部楼层
专题4:Maix Bit K210在线训练模型【保姆级教程】
https://blog.csdn.net/csdn_rp/article/details/119910963
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|DiscuzX

GMT+8, 2025-6-8 10:52 , Processed in 0.038085 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表