上班摸鱼敲木鱼——小安派R2测评
开箱:P
小安派开箱:共有如下配件:480*480触摸屏;为Ai-M61-32S设计的4寸RGB显示屏驱动板;扬声器;麦克风咪头;USB摄像头;摄像头连接线;IO连接线
480*480触摸屏 |
4寸RGB显示屏驱动板 |
扬声器 |
麦克风咪头 |
USB摄像头 |
摄像头连接线 |
IO连接线 |
为避免短路,3D打印了一个外壳固定元件,正面图如下:
背面图片:
RGB显示屏驱动板特写,该板子搭载的Ai-M61-32S 模组支持WiFi6、BLE5.3。具有丰富的外设接口,具体包括 DVP、MJPEG、Dispaly、AudioCodec、USB2.0、SDU、以太网 (EMAC)、SD/MMC(SDH)、SPI、UART、I2C、I2S、PWM、GPDAC、GPADC、ACOMP 和 GPIO 等。集成了SPI屏幕接口,DVP摄像头接口,预留TF卡座,并且引出USB接口,可接入USB摄像头。
开箱结束!
环境搭建。゚(゚´ω`゚)゚。
参照大佬@起个名字好难啊
零基础搭建小安派Windows 开发环境零基础搭建小安派Windows 开发环境 - 小安派&M61环境搭建、编译烧录教程 - 物联网开发者社区-安信可论坛 - Powered by Discuz!
感谢大佬!!
-
Git拉取源码
git clone https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git -b master
cd AiPi-Open-Kits/
git submodule init
git submodule update
cd aithinker_Ai-M6X_SDK/
git submodule init
git submodule update
aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows\bin
aithinker_Ai-M6X_SDK\tools\make
aithinker_Ai-M6X_SDK\tools\ninja
-
编译工具链
导入工具链toolchain、tools
-
验证配置是够成功
make -v
riscv64-unknown-elf-gcc -v
- 编译、烧录程序
vscode终端进入src进行编译
make BL_SDK_BASE=U:/code/xiaoanpi/AiPi-Open-Kits/aithinker_Ai-M6X_SDK
编译成功,开始烧录
烧录过程有点小问题,记得检查接线、、、、
make flash COMX=COM5 BL_SDK_BASE=U:/code/xiaoanpi/AiPi-Open-Kits/aithinker_Ai-M6X_SDK
烧录成功!!
性能测试(横向比较)(•̀ᴗ•́)و ̑̑
小安派-Eyes-R2性能测试结果:
- 与其他芯片的对比(某鑫Exx32-S3-LCD-EV-Board):
- 两块板子横向对比:
性能测试对比结果:
小安派FPS略高,小安派搭载的bl618 内置一颗32-bitRISC-VCPU主频320MHz,竞品搭载 Xtensa® 32 位 LX7 双核处理器主频240MHz,但测试中受限于个人能力,某鑫同类产品似乎只使用了一个核,因此对比结果不够严谨,仅供娱乐,请勿用于选型参考。
DIY项目 ≧◡≦ノ⌒☆
- 上班敲木鱼
- 使用squarelline_studio编辑UI并导出
导出目录在
- 将导出的 UI 源码添加到项目工程中,主程序中添加
ui.h
头文件,调用一次 ui_init()
函数即可
- 为方便工程管理,可使用宏定义
建立 xx_conf.h
文件进行管理
如图,板载性能测试 LV_USE_DEMO_BENCHMARK
,图形界面 UI
部分代码
需要使用LVGL知识,详情参见百问网Introduction (介绍) — 百问网LVGL中文教程文档 文档
void ui_Screen1_screen_init(void)
{
ui_Screen1 = lv_obj_create(NULL);
lv_obj_clear_flag(ui_Screen1, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_Screen1, lv_color_hex(0xFFFFFF), LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_Screen1, 255, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);
ui_Image2 = lv_img_create(ui_Screen1);
lv_img_set_src(ui_Image2, &ui_img_image_a8890b2ae7c89994_png);
lv_obj_set_width(ui_Image2, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Image2, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Image2, 3);
lv_obj_set_y(ui_Image2, -3);
lv_obj_set_align(ui_Image2, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_Image2, LV_OBJ_FLAG_ADV_HITTEST); /// Flags
lv_obj_clear_flag(ui_Image2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_Image2, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_Image2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_color(ui_Image2, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Button1 = lv_btn_create(ui_Screen1);
lv_obj_set_width(ui_Button1, lv_pct(40));
lv_obj_set_height(ui_Button1, lv_pct(20));
lv_obj_set_x(ui_Button1, -104);
lv_obj_set_y(ui_Button1, -146);
lv_obj_set_align(ui_Button1, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_Button1, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
lv_obj_clear_flag(ui_Button1, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_Button1, lv_color_hex(0xFFD6D5), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_Button1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_color(ui_Button1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_img_src(ui_Button1, &ui_img_725565046, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Button2 = lv_btn_create(ui_Screen1);
lv_obj_set_width(ui_Button2, lv_pct(40));
lv_obj_set_height(ui_Button2, lv_pct(20));
lv_obj_set_x(ui_Button2, -105);
lv_obj_set_y(ui_Button2, -4);
lv_obj_set_align(ui_Button2, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_Button2, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
lv_obj_clear_flag(ui_Button2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_Button2, lv_color_hex(0xFFD6D5), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_Button2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_img_src(ui_Button2, &ui_img_958301348, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_object_set_themeable_style_property(ui_Button2, LV_PART_MAIN | LV_STATE_DEFAULT, LV_STYLE_BG_IMG_RECOLOR,
_ui_theme_color_aaa);
ui_object_set_themeable_style_property(ui_Button2, LV_PART_MAIN | LV_STATE_DEFAULT, LV_STYLE_BG_IMG_RECOLOR_OPA,
_ui_theme_alpha_aaa);
ui_Button3 = lv_btn_create(ui_Screen1);
lv_obj_set_width(ui_Button3, lv_pct(40));
lv_obj_set_height(ui_Button3, lv_pct(20));
lv_obj_set_x(ui_Button3, -106);
lv_obj_set_y(ui_Button3, 135);
lv_obj_set_align(ui_Button3, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_Button3, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
lv_obj_clear_flag(ui_Button3, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_Button3, lv_color_hex(0xFDD7D7), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_Button3, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_img_src(ui_Button3, &ui_img_1685869645, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Switch1 = lv_switch_create(ui_Screen1);
lv_obj_set_width(ui_Switch1, 204);
lv_obj_set_height(ui_Switch1, 81);
lv_obj_set_x(ui_Switch1, 118);
lv_obj_set_y(ui_Switch1, -2);
lv_obj_set_align(ui_Switch1, LV_ALIGN_CENTER);
lv_obj_add_event_cb(ui_Button1, ui_event_Button1, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_Button2, ui_event_Button2, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_Button3, ui_event_Button3, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_Switch1, ui_event_Switch1, LV_EVENT_ALL, NULL);
}
编译烧录
启动!!
不足与建议 ╭( ・ㅂ・)و ̑̑ ̑̑╮
真心觉得板子集成度太低,需要使用ttl下载,也没有led灯供调试使用
但是性能还是挺强大滴