IT评测·应用市场-qidao123.com

标题: 嵌入式产品级-超小尺寸热成像相机(从0到1 硬件-软件-外壳) [打印本页]

作者: 忿忿的泥巴坨    时间: 2025-1-21 04:27
标题: 嵌入式产品级-超小尺寸热成像相机(从0到1 硬件-软件-外壳)
Thermal_Imaging_Camera 
This is a small thermal imaging camera that includes everything from hardware and software.

小尺寸热成像相机-Pico-LVGL-RTOS

基于RP2040 Pico主控与RTOS,榨干双核性能实现LVGL和成图任务并行。ST7789驱动240×280屏,CST816T触摸IC,MLX90640传感器实现热成像功能。充电接纳SGM4056,DC-DC利用SGM6031等等。
产品描述:树莓派RP204 Pico, 双核 LVGL RTOS,合理分配热成像出现内容,UI画面的更新反馈。
探头既可支持长焦的BAB款,支持广角的BAA款,MCU + ST7789屏幕(240 * 280)+ CST816T 触摸IC + MLX90640热成像传感器 + 充电接纳SGM4056,DC-DC利用SGM6031等等。
ui类似Apple Watch,按键1开启ui,支持卡尔曼滤波、插值切换、7种显示色彩和温度,折线图,电池电量。按键2拍照,触摸屏显示任意位置温度不限个数,支持调光。
传统热成像设备的痛点

用户需求

产品优势

项目包罗下述内容

功能图例

下图为用户设置设置界面,你可以设置设置你想要的参数,例如是否插值,是否启用卡尔曼滤波,色彩选择等。

下图是温度折线图界面,左滑即可。

下图为电源状态管理界面,右滑即可。

下图为相机状态,也就是捕获热源成像。

下述就是不同色彩出现的图示了。



更多内容附在资料包中~
代码部分如下所示:展示部分。
  1. void my_disp_flush( lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p )
  2. {
  3.     uint32_t w = ( area->x2 - area->x1 + 1 );
  4.     uint32_t h = ( area->y2 - area->y1 + 1 );
  5.     tft.startWrite();
  6.     #if (ROTATE == 0 || ROTATE == 2)
  7.     tft.setAddrWindow( area->x1, area->y1, w, h );
  8.     #endif
  9.     #if (ROTATE == 1 || ROTATE == 3)
  10.     tft.setAddrWindow( area->x1, area->y1, w, h );
  11.     #endif
  12.     tft.pushColors( ( uint16_t * )&color_p->full, w * h, true );
  13.     tft.endWrite();
  14.     lv_disp_flush_ready( disp_drv );
  15. }
  16. /*Read the touchpad*/
  17. void my_touchpad_read( lv_indev_drv_t * indev_drv, lv_indev_data_t * data )
  18. {
  19.     touch.update();
  20.     // Serial.print( "touch called " );
  21.     // Serial.println( touch.tp.touching );
  22.     bool touched = touch.tp.touching;
  23.     if( !touched )
  24.     // if( 0!=touch.data.points )
  25.     {
  26.         data->state = LV_INDEV_STATE_REL;
  27.     }
  28.     else
  29.     {
  30.         data->state = LV_INDEV_STATE_PR;
  31.         #if (ROTATE == 0)
  32.         /*Change to your screen resolution*/
  33.         data->point.x = touch.tp.x;
  34.         data->point.y = touch.tp.y;
  35.         #endif
  36.         #if (ROTATE == 1)
  37.         /*Change to your screen resolution*/
  38.         data->point.x = touch.tp.y;
  39.         data->point.y = 240-touch.tp.x;
  40.         #endif
  41.         #if (ROTATE == 2)
  42.         /*Change to your screen resolution*/
  43.         data->point.x = 240-touch.tp.x;
  44.         data->point.y = 280-touch.tp.y;
  45.         #endif
  46.         #if (ROTATE == 3)
  47.         data->point.x = 280-touch.tp.y;
  48.         data->point.y = touch.tp.x;
  49.         #endif
  50.         // data->point.x = touch.tp.x;
  51.         // data->point.y = touch.tp.y;
  52.         // Serial.print( "Data x " );
  53.         // Serial.println( touch.tp.x );
  54.         // Serial.print( "Data y " );
  55.         // Serial.println( touch.tp.y );  
  56.     }
  57. }
  58. // 按键输入设备读取回调函数
  59. void my_keypad_read(lv_indev_drv_t * drv, lv_indev_data_t * data)
  60. {
  61.     int button_state = digitalRead(24);  // 读取按键的状态,假设按键接地为 LOW
  62.     if (button_state == LOW) {
  63.         // 如果按键按下,记录开始按下的时间
  64.         if (btn2_pushed_start_time == 0) {
  65.             btn2_pushed_start_time = millis();
  66.         }
  67.         // 检测是否为长按
  68.         if (millis() - btn2_pushed_start_time >= BTN_LONG_PUSH_T) {
  69.             if (!btn2_long_pushed) {
  70.                 btn2_long_pushed = true;  // 标记为长按
  71.                 // 长按的处理,例如切换到不同屏幕
  72.                
  73.             }
  74.         }
  75.         data->state = LV_INDEV_STATE_PRESSED;  // 按键按下
  76.     } else {
  77.         // 按键松开,判断是否为短按
  78.         if (btn2_pushed_start_time != 0) {
  79.             if (!btn2_long_pushed) {
  80.                 btn2_pushed = true;  // 短按标记
  81.                 // 短按的处理,例如切换到不同屏幕
  82.                 if (!btn2_long_pushed){freeze = !freeze; } //切换 freeze 状态
  83.             }
  84.             btn2_pushed_start_time = 0;  // 重置按下时间
  85.         }
  86.         // 清除长按标记
  87.         btn2_long_pushed = false;
  88.         data->state = LV_INDEV_STATE_RELEASED;  // 按键松开
  89.     }
  90. }
  91. void my_keypad_bootsel_read(lv_indev_drv_t * drv, lv_indev_data_t * data)
  92. {
  93.     if (BOOTSEL) {
  94.         // 如果按键按下,记录开始按下的时间
  95.         if (btn1_pushed_start_time == 0) {
  96.             btn1_pushed_start_time = millis();
  97.         }
  98.         // 检测是否为长按
  99.         if (millis() - btn1_pushed_start_time >= BTN_LONG_PUSH_T) {
  100.             if (!btn1_long_pushed) {
  101.                 btn1_long_pushed = true;  // 标记为长按
  102.                 // 长按的处理,例如切换到不同屏幕
  103.                 _ui_screen_change(&ui_Screen3, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_Screen3_screen_init);
  104.             }
  105.         }
  106.         data->state = LV_INDEV_STATE_PRESSED;  // 按键按下
  107.     } else {
  108.         // 按键松开,判断是否为短按
  109.         if (btn1_pushed_start_time != 0) {
  110.             if (!btn1_long_pushed) {
  111.                 btn1_pushed = true;  // 短按标记
  112.                 // 短按的处理,例如切换到不同屏幕
  113.                 user_ui_flag = !user_ui_flag;
  114.                 if(user_ui_flag){
  115.                   test_points[0][0] = 0; // 重置测试点数据
  116.                   test_points[0][1] = 0;
  117.                   _ui_screen_change(&ui_Screen2, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_Screen2_screen_init);
  118.                 } else {
  119.                   _ui_screen_change(&ui_Screen1, LV_SCR_LOAD_ANIM_FADE_ON, 0, 0, &ui_Screen1_screen_init);
  120.                 }
  121.             }
  122.             btn1_pushed_start_time = 0;  // 重置按下时间
  123.         }
  124.         // 清除长按标记
  125.         btn1_long_pushed = false;
  126.         data->state = LV_INDEV_STATE_RELEASED;  // 按键松开
  127.     }
  128. }
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 IT评测·应用市场-qidao123.com (https://dis.qidao123.com/) Powered by Discuz! X3.4