国产精品久久久aaaa,日日干夜夜操天天插,亚洲乱熟女香蕉一区二区三区少妇,99精品国产高清一区二区三区,国产成人精品一区二区色戒,久久久国产精品成人免费,亚洲精品毛片久久久久,99久久婷婷国产综合精品电影,国产一区二区三区任你鲁

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();}

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

    關注

    2576

    文章

    55041

    瀏覽量

    791339
  • 開源
    +關注

    關注

    3

    文章

    4207

    瀏覽量

    46142
  • 智能屏幕
    +關注

    關注

    0

    文章

    73

    瀏覽量

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

掃碼添加小助手

加入工程師交流群

    評論

    相關推薦
    熱點推薦

    汽車級多功能門執行驅動L99DZ80EP深度解析

    汽車級多功能門執行驅動L99DZ80EP深度解析 在汽車電子領域,門執行驅動的性能和可靠性至關重要。今天我們要深入探討的L99DZ8
    的頭像 發表于 03-02 15:25 ?115次閱讀

    用于SWD/JTAG調試多功能轉接板設計

    這款多功能轉接板主要設計用于與 J-Link 調試配合使用(同時兼容其他采用標準 20 引腳 JTAG/SWD 引腳定義的調試),允許用戶在 0.1" (2.54mm
    的頭像 發表于 01-19 09:46 ?3337次閱讀
    用于SWD/JTAG調試<b class='flag-5'>器</b>的<b class='flag-5'>多功能</b>轉接板設計

    NF WF1973多功能信號發生:精密波形生成的靈活平臺

    在電子電路設計、傳感激勵、音頻測試及教育科研領域,一款能夠提供高精度、低失真且功能靈活的通用信號源是研發與測試的基石。NF公司(NF Corporation)的WF1973多功能信號發生
    的頭像 發表于 01-06 17:23 ?545次閱讀

    MS1826 HDMI 多功能視頻處理數據手冊

    電子發燒友網站提供《MS1826 HDMI 多功能視頻處理數據手冊.pdf》資料免費下載
    發表于 09-26 16:35 ?12次下載

    基于Infineon TVII-B的高性能多功能座椅控制解決方案

    隨著消費者對汽車舒適性和安全性需求的不斷提升,多功能座椅市場迎來了快速增長。特別是在新能源汽車領域,多功能座椅已成為提升產品競爭力的重要配置。英飛凌基于TVII-B系列芯片的多功能座椅控制
    的頭像 發表于 08-19 15:03 ?2711次閱讀
    基于Infineon TVII-B的高性能<b class='flag-5'>多功能</b>座椅控制<b class='flag-5'>器</b>解決方案

    Texas Instruments SN74LVC3G5x可配置多功能柵極數據手冊

    Texas Instruments SN74LVC3G5x可配置多功能帶施密特觸發輸入的門工作在1.1V至3.6V電源電壓范圍內。輸出狀態由3位輸入8種模式決定。SN74LVC3G57多功能門讓
    的頭像 發表于 07-29 09:48 ?726次閱讀
    Texas Instruments SN74LVC3G5x可配置<b class='flag-5'>多功能</b>柵極數據手冊

    開源獲獎案例】AI智能交互新方案:基于T5L智能屏的AI DeepSeek大模型

    ——來自迪文開發者論壇本期為大家推送迪文開發者論壇獲獎開源案例——AI智能交互新方案:基于T5L智能屏的AIDeepSeek大模型。該方案通過T5L串口與AI模塊開發板進行數據交互,支持用戶與屏幕智能實時對話交互,并同步展示動態表情,構建了具有情感化交互能力的AI終端解決
    的頭像 發表于 07-12 09:02 ?1062次閱讀
    【<b class='flag-5'>開源</b><b class='flag-5'>獲獎</b>案例】AI智能交互新方案:基于T5L智能屏的AI DeepSeek大模型

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

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

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

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

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

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

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

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

    分析影響稱重傳感器遲滯性的因素

    在現代工業、科研及日常生活中,稱重傳感器作為精確測量物體重量的關鍵設備,其性能的穩定性和準確性至關重要。然而,稱重傳感器在使用過程中常會出現一種名為“遲滯性”的現象,即傳感在正向(加載)和反向
    的頭像 發表于 04-17 16:07 ?1259次閱讀
    分析影響<b class='flag-5'>稱重傳感器</b>遲滯性的因素

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

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

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

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