91在线观看视频-91在线观看视频-91在线观看免费视频-91在线观看免费-欧美第二页-欧美第1页

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
會員中心
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示

【開源獲獎案例】多功能稱重器

迪文智能屏 ? 2024-04-20 08:12 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

——來自迪文開發者論壇

本期為大家推送迪文開發者論壇獲獎開源案例——多功能稱重器工程師采用4英寸COF智能屏,通過T5L OS核與HX711模塊及5kg壓力傳感器套裝進行數據交互,用戶可輕松實現重量、單價、總價、去皮等計價顯示功能,以及計數、重量變化曲線跟蹤和稱重器精準度矯正等功能,輕松切換不同應用場景,享受便捷高效稱重體驗。


UI開發示例

be60b46a-feaa-11ee-9118-92fbcf53809c.png

C51工程設計 稱重器實現計價功能的部分參考代碼如下:

//計價頁面===================#define VALUATION_UNIT_PRICE_ADDR 0x1010#define VALUATION_GRAM_ADDR 0x1000#define VALUATION_TOTAL_PRICES_ADDR 0x1020uint32_t valuation_decorticate = 0; //計價去皮重量uint32_t valuation_unit_price = 0; //單價//單價刷新void page_valuation_unit_price_refresh(){ uint8_t test_display[10] = {0}; if(valuation_unit_price < 1000) { test_display[0] = valuation_unit_price / 100 % 10 + 0x30; test_display[1] = '.'; test_display[2] = valuation_unit_price / 10 % 10 + 0x30; test_display[3] = valuation_unit_price / 1 % 10 + 0x30; dgus_show_text_value_set(VALUATION_UNIT_PRICE_ADDR, test_display, 4); } else if(valuation_unit_price < 10000) { test_display[0] = valuation_unit_price / 1000 % 10 + 0x30; test_display[1] = valuation_unit_price / 100 % 10 + 0x30; test_display[2] = '.'; test_display[3] = valuation_unit_price / 10 % 10 + 0x30; test_display[4] = valuation_unit_price / 1 % 10 + 0x30; dgus_show_text_value_set(VALUATION_UNIT_PRICE_ADDR, test_display, 4); } else if(valuation_unit_price < 100000) { test_display[0] = valuation_unit_price / 10000 % 10 + 0x30; test_display[1] = valuation_unit_price / 1000 % 10 + 0x30; test_display[2] = valuation_unit_price / 100 % 10 + 0x30; test_display[3] = '.'; test_display[4] = valuation_unit_price / 10 % 10 + 0x30; test_display[5] = valuation_unit_price / 1 % 10 + 0x30; dgus_show_text_value_set(VALUATION_UNIT_PRICE_ADDR, test_display, 4); } else if(valuation_unit_price < 1000000) { test_display[0] = valuation_unit_price / 100000 % 10 + 0x30; test_display[1] = valuation_unit_price / 10000 % 10 + 0x30; test_display[2] = valuation_unit_price / 1000 % 10 + 0x30; test_display[3] = valuation_unit_price / 100 % 10 + 0x30; test_display[4] = '.'; test_display[5] = valuation_unit_price / 10 % 10 + 0x30; test_display[6] = valuation_unit_price / 1 % 10 + 0x30; dgus_show_text_value_set(VALUATION_UNIT_PRICE_ADDR, test_display, 4); }}
//重量刷新void page_valuation_weight_refresh(){ uint8_t test_display[10] = {0x30}; uint32_t gram_display = 0; if(gram_value >= valuation_decorticate) { gram_display = gram_value - valuation_decorticate; if(gram_display < 10) { test_display[0] = gram_display / 1 % 10 + 0x30; dgus_show_text_value_set(VALUATION_GRAM_ADDR, test_display, 3); } else if(gram_display < 100) { test_display[0] = gram_display / 10 % 10 + 0x30; test_display[1] = gram_display / 1 % 10 + 0x30; dgus_show_text_value_set(VALUATION_GRAM_ADDR, test_display, 3); } else if(gram_display < 1000) { test_display[0] = gram_display / 100 % 10 + 0x30; test_display[1] = gram_display / 10 % 10 + 0x30; test_display[2] = gram_display / 1 % 10 + 0x30; dgus_show_text_value_set(VALUATION_GRAM_ADDR, test_display, 3); } else if(gram_display < 10000) { test_display[0] = gram_display / 1000 % 10 + 0x30; test_display[1] = gram_display / 100 % 10 + 0x30; test_display[2] = gram_display / 10 % 10 + 0x30; test_display[3] = gram_display / 1 % 10 + 0x30; dgus_show_text_value_set(VALUATION_GRAM_ADDR, test_display, 3); } else if(gram_display < 100000) { test_display[0] = gram_display / 10000 % 10 + 0x30; test_display[1] = gram_display / 1000 % 10 + 0x30; test_display[2] = gram_display / 100 % 10 + 0x30; test_display[3] = gram_display / 10 % 10 + 0x30; test_display[4] = gram_display / 1 % 10 + 0x30; dgus_show_text_value_set(VALUATION_GRAM_ADDR, test_display, 3); } } else { dgus_show_text_value_set(VALUATION_GRAM_ADDR, test_display, 3); }}
//總價刷新void page_valuation_price_refresh(){ uint32_t price_value = 0; uint8_t test_display[10] = {0x30, '.', 0x30, 0x30}; if(gram_value >= valuation_decorticate) { price_value = (gram_value - valuation_decorticate) * valuation_unit_price * 2 / 1000; if(price_value < 1000) { test_display[0] = price_value / 100 % 10 + 0x30; test_display[1] = '.'; test_display[2] = price_value / 10 % 10 + 0x30; test_display[3] = price_value / 1 % 10 + 0x30; dgus_show_text_value_set(VALUATION_TOTAL_PRICES_ADDR, test_display, 4); } else if(price_value < 10000) { test_display[0] = price_value / 1000 % 10 + 0x30; test_display[1] = price_value / 100 % 10 + 0x30; test_display[2] = '.';

test_display[3] = price_value / 10 % 10 + 0x30; test_display[4] = price_value / 1 % 10 + 0x30; dgus_show_text_value_set(VALUATION_TOTAL_PRICES_ADDR, test_display, 4); } else if(price_value < 100000)

{ test_display[0] = price_value / 10000 % 10 + 0x30; test_display[1] = price_value / 1000 % 10 + 0x30; test_display[2] = price_value / 100 % 10 + 0x30; test_display[3] = '.'; test_display[4] = price_value / 10 % 10 + 0x30; test_display[5] = price_value / 1 % 10 + 0x30; dgus_show_text_value_set(VALUATION_TOTAL_PRICES_ADDR, test_display, 4);

} else if(price_value < 1000000) { test_display[0] = price_value / 100000 % 10 + 0x30; test_display[1] = price_value / 10000 % 10 + 0x30; test_display[2] = price_value / 1000 % 10 + 0x30; test_display[3] = price_value / 100 % 10 + 0x30; test_display[4] = '.'; test_display[5] = price_value / 10 % 10 + 0x30; test_display[6] = price_value / 1 % 10 + 0x30; dgus_show_text_value_set(VALUATION_TOTAL_PRICES_ADDR, test_display, 4); } } else { dgus_show_text_value_set(VALUATION_TOTAL_PRICES_ADDR, test_display, 4); }}void page_valuation_decorticate(){ valuation_decorticate = gram_value; page_valuation_weight_refresh();}void page_valuation_1(){ if(valuation_unit_price < 100000) { valuation_unit_price = valuation_unit_price * 10 + 1; page_valuation_unit_price_refresh(); }}void page_valuation_2(){ if(valuation_unit_price < 100000) { valuation_unit_price = valuation_unit_price * 10 + 2; page_valuation_unit_price_refresh(); }}void page_valuation_3(){ if(valuation_unit_price < 100000) { valuation_unit_price = valuation_unit_price * 10 + 3; page_valuation_unit_price_refresh(); }}void page_valuation_4(){ if(valuation_unit_price < 100000) { valuation_unit_price = valuation_unit_price * 10 + 4; page_valuation_unit_price_refresh(); }}

void page_valuation_5(){ if(valuation_unit_price < 100000) { valuation_unit_price = valuation_unit_price * 10 + 5; page_valuation_unit_price_refresh(); }}void page_valuation_6(){ if(valuation_unit_price < 100000) { valuation_unit_price = valuation_unit_price * 10 + 6; page_valuation_unit_price_refresh(); }}void page_valuation_7(){ if(valuation_unit_price < 100000) { valuation_unit_price = valuation_unit_price * 10 + 7; page_valuation_unit_price_refresh(); }}void page_valuation_8(){ if(valuation_unit_price < 100000) { valuation_unit_price = valuation_unit_price * 10 + 8; page_valuation_unit_price_refresh(); }}void page_valuation_9(){ if(valuation_unit_price < 100000) { valuation_unit_price = valuation_unit_price * 10 + 9; page_valuation_unit_price_refresh(); }}void page_valuation_0(){ if(valuation_unit_price < 100000) { valuation_unit_price = valuation_unit_price * 10 + 0; page_valuation_unit_price_refresh(); }}void page_valuation_back(){ valuation_unit_price = valuation_unit_price / 10; page_valuation_unit_price_refresh();}void page_valuation_clear(){ valuation_unit_price = 0; page_valuation_unit_price_refresh();}

聲明:本文內容及配圖由入駐作者撰寫或者入駐合作網站授權轉載。文章觀點僅代表作者本人,不代表電子發燒友網立場。文章及其配圖僅供工程師學習之用,如有內容侵權或者其他違規問題,請聯系本站處理。 舉報投訴
  • 傳感器
    +關注

    關注

    2565

    文章

    52971

    瀏覽量

    767199
  • 開源
    +關注

    關注

    3

    文章

    3678

    瀏覽量

    43814
  • 智能屏幕
    +關注

    關注

    0

    文章

    72

    瀏覽量

    3656
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評論

    相關推薦
    熱點推薦

    千方科技推出多功能交通調查站解決方案

    2025年初,交通運輸部印發《普通國省道多功能交通調查站布局和建設方案》,要求各省市加快建設多功能交通調查站,提升國省道交通調查能力,推進公路數字化。千方科技快速響應并推出“智能感知+邊端融合”的多功能交通調查站解決方案,支持“
    的頭像 發表于 07-09 15:52 ?206次閱讀

    稱重控制儀表通過工業網關數據采集到MES系統中

    稱重控制儀表是一種高精度、自動化、多功能稱重控制儀表,廣泛應用于多個行業,如鋰電、化工、冶金、食品、醫藥等。作為自動稱重配料控制系統的重要組件,
    的頭像 發表于 06-19 13:57 ?190次閱讀

    開源獲獎案例】基于T5L智能屏的音樂播放與歌詞顯示方案

    ——來自迪文開發者論壇本期為大家推送迪文開發者論壇獲獎開源案例——基于T5L智能屏的音樂播放與歌詞顯示方案。該方案通過T5L串口與通用開發板、解碼板進行數據交互,將解析完成的音頻和歌詞通過串口發送給智能屏,實現音樂播放、歌詞顯示、歌曲播放進度控制等
    的頭像 發表于 05-08 09:52 ?253次閱讀
    【<b class='flag-5'>開源</b><b class='flag-5'>獲獎</b>案例】基于T5L智能屏的音樂播放與歌詞顯示方案

    開源獲獎案例】基于T5L智能屏的零食機

    ——來自迪文開發者論壇本期為大家推送迪文開發者論壇獲獎開源案例——基于T5L智能屏的零食機。該方案基于T5L芯片,通過PWM接口實現實時調控爪子抓取力度、速度,并支持后臺按鍵長按時間讀取,各模塊自檢
    的頭像 發表于 04-30 18:20 ?206次閱讀
    【<b class='flag-5'>開源</b><b class='flag-5'>獲獎</b>案例】基于T5L智能屏的零食機

    基于stm32設計一個多功能體重秤

    使用四個50kg的半橋式電阻應變片和hx711組成稱重傳感器,想各位大神怎么編寫代碼能獲取真實的體重?
    發表于 04-12 22:07

    開源獲獎案例】基于T5L智能屏的FM收音機

    ——來自迪文開發者論壇本期為大家推送迪文開發者論壇獲獎開源案例——基于T5L智能屏的FM收音機。該方案基于T5L智能屏,通過串口4與FM收音機模塊進行通訊,實現自動搜索獲取不同頻段電臺,同時支持選臺、頻率調節、音量控制等功能,為
    的頭像 發表于 03-28 15:39 ?407次閱讀
    【<b class='flag-5'>開源</b><b class='flag-5'>獲獎</b>案例】基于T5L智能屏的FM收音機

    S型稱重傳感器的原理與選擇使用

    S型稱重傳感器是傳感領域中一種常見且重要的設備,廣泛應用于工業生產和包裝行業等領域。本文將詳細介紹S型稱重傳感器的工作原理、選擇要點以及使用說明,以期為相關行業從業者提供有價值的參考。 一、S型
    的頭像 發表于 03-04 18:27 ?389次閱讀
    S型<b class='flag-5'>稱重傳感器</b>的原理與選擇使用

    開源獲獎案例】基于T5L智能屏的EQ均衡效果

    ——來自迪文開發者論壇本期為大家推送迪文開發者論壇獲獎開源案例——基于T5L智能屏的EQ均衡效果。工程師采用800×480分辨率屏幕,通過T5L串口4與均衡效果開發板通訊,調節中心
    的頭像 發表于 02-14 11:27 ?509次閱讀
    【<b class='flag-5'>開源</b><b class='flag-5'>獲獎</b>案例】基于T5L智能屏的EQ均衡效果<b class='flag-5'>器</b>

    多功能智慧路燈系統整體解決方案介紹

    多功能智慧路燈系統整體解決方案介紹
    的頭像 發表于 01-15 09:12 ?607次閱讀
    <b class='flag-5'>多功能</b>智慧路燈系統整體解決方案介紹

    安科瑞ADF400L多功能電表產品簡單介紹

    多功能電表
    jf_25373932
    發布于 :2024年12月03日 15:59:48

    多功能UC1834優化線性調節效率

    電子發燒友網站提供《多功能UC1834優化線性調節效率.pdf》資料免費下載
    發表于 10-24 09:51 ?0次下載
    <b class='flag-5'>多功能</b>UC1834優化線性調節<b class='flag-5'>器</b>效率

    物聯網行業中的智能稱重方案介紹_稱重傳感器分析

    物聯網系統中為什么要使用稱重傳感器 ??聯網系統中使用稱重傳感器的原因主要有以下幾點: 全面感知與信息采集 基礎感知元件:傳感是物聯網的感覺器官,能夠感知、探測、采集和獲取目標對象各種形態的信息
    的頭像 發表于 09-24 14:30 ?1014次閱讀
    物聯網行業中的智能<b class='flag-5'>稱重</b>方案介紹_<b class='flag-5'>稱重傳感器</b>分析

    開源獲獎案例】基于T5L智能屏的汽車抬頭顯示方案

    ——來自迪文開發者論壇本期為大家推送迪文開發者論壇獲獎開源案例——基于T5L智能屏的汽車抬頭顯示方案。該方案采用COF智能屏,通過T5LCAN接口,實時獲取汽車OBDII診斷接口的數據,并將接收到的車速和轉速數據同步顯示在屏幕
    的頭像 發表于 09-24 08:03 ?714次閱讀
    【<b class='flag-5'>開源</b><b class='flag-5'>獲獎</b>案例】基于T5L智能屏的汽車抬頭顯示<b class='flag-5'>器</b>方案

    TI 降壓轉換多功能引腳及其應用的簡介

    電子發燒友網站提供《TI 降壓轉換多功能引腳及其應用的簡介.pdf》資料免費下載
    發表于 09-10 10:26 ?0次下載
    TI 降壓轉換<b class='flag-5'>器</b><b class='flag-5'>多功能</b>引腳及其應用的簡介

    多功能引腳及其在TI降壓轉換中的應用

    電子發燒友網站提供《多功能引腳及其在TI降壓轉換中的應用.pdf》資料免費下載
    發表于 08-26 14:35 ?0次下載
    <b class='flag-5'>多功能</b>引腳及其在TI降壓轉換<b class='flag-5'>器</b>中的應用
    主站蜘蛛池模板: 奇米影视久久 | 永久免费看毛片 | 4tube高清性欧美 | 1024免费看片 | 国产一级做a爰片久久毛片男 | 日本免费观看完整视频 | 天天天狠天天透天天制色 | 一级毛片 在线播放 | 久久香蕉国产线看观看亚洲片 | 韩国精品视频 | 9久久9久久精品 | 免费国产高清精品一区在线 | 操的好爽 | 久青草国产手机在线观 | 欧美一区二区三区免费看 | 久久性色 | 亚洲3级| 三及毛片| 看看一级毛片 | 嘿嘿午夜| 性欧美大战久久久久久久野外 | 伊人成人在线 | 亚洲欧洲色天使日韩精品 | 性视频一区 | 久久久久毛片成人精品 | 狠狠夜夜| 分分精品| 国产精品29页 | 在线免费看黄 | h网站在线看 | 免费观看一级一片 | 黄色香蕉网站 | 狠狠干夜夜骑 | 奇米9999| 2018国产大陆天天弄 | 久久久久毛片成人精品 | 在线观看色视频网站 | 日韩激情淫片免费看 | 高清欧美性xxxx成熟 | 欧亚精品卡一卡二卡三 | 喷潮白浆直流在线播放 |