91欧美超碰AV自拍|国产成年人性爱视频免费看|亚洲 日韩 欧美一厂二区入|人人看人人爽人人操aV|丝袜美腿视频一区二区在线看|人人操人人爽人人爱|婷婷五月天超碰|97色色欧美亚州A√|另类A√无码精品一级av|欧美特级日韩特级

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫(xiě)文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

【開(kāi)源獲獎(jiǎng)案例】多功能稱重器

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

掃碼添加小助手

加入工程師交流群

——來(lái)自迪文開(kāi)發(fā)者論壇

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


UI開(kāi)發(fā)示例

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

C51工程設(shè)計(jì) 稱重器實(shí)現(xiàn)計(jì)價(jià)功能的部分參考代碼如下:

//計(jì)價(jià)頁(yè)面===================#define VALUATION_UNIT_PRICE_ADDR 0x1010#define VALUATION_GRAM_ADDR 0x1000#define VALUATION_TOTAL_PRICES_ADDR 0x1020uint32_t valuation_decorticate = 0; //計(jì)價(jià)去皮重量uint32_t valuation_unit_price = 0; //單價(jià)//單價(jià)刷新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); }}
//總價(jià)刷新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();}

聲明:本文內(nèi)容及配圖由入駐作者撰寫(xiě)或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問(wèn)題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • 傳感器
    +關(guān)注

    關(guān)注

    2576

    文章

    55069

    瀏覽量

    791537
  • 開(kāi)源
    +關(guān)注

    關(guān)注

    3

    文章

    4209

    瀏覽量

    46180
  • 智能屏幕
    +關(guān)注

    關(guān)注

    0

    文章

    74

    瀏覽量

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

掃碼添加小助手

加入工程師交流群

    評(píng)論

    相關(guān)推薦
    熱點(diǎn)推薦

    汽車(chē)級(jí)多功能門(mén)執(zhí)行驅(qū)動(dòng)L99DZ80EP深度解析

    汽車(chē)級(jí)多功能門(mén)執(zhí)行驅(qū)動(dòng)L99DZ80EP深度解析 在汽車(chē)電子領(lǐng)域,門(mén)執(zhí)行驅(qū)動(dòng)的性能和可靠性至關(guān)重要。今天我們要深入探討的L99DZ8
    的頭像 發(fā)表于 03-02 15:25 ?137次閱讀

    用于SWD/JTAG調(diào)試多功能轉(zhuǎn)接板設(shè)計(jì)

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

    NF WF1973多功能信號(hào)發(fā)生:精密波形生成的靈活平臺(tái)

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

    MS1826 HDMI 多功能視頻處理數(shù)據(jù)手冊(cè)

    電子發(fā)燒友網(wǎng)站提供《MS1826 HDMI 多功能視頻處理數(shù)據(jù)手冊(cè).pdf》資料免費(fèi)下載
    發(fā)表于 09-26 16:35 ?12次下載

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

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

    Texas Instruments SN74LVC3G5x可配置多功能柵極數(shù)據(jù)手冊(cè)

    Texas Instruments SN74LVC3G5x可配置多功能帶施密特觸發(fā)輸入的門(mén)工作在1.1V至3.6V電源電壓范圍內(nèi)。輸出狀態(tài)由3位輸入8種模式?jīng)Q定。SN74LVC3G57多功能門(mén)讓
    的頭像 發(fā)表于 07-29 09:48 ?741次閱讀
    Texas Instruments SN74LVC3G5x可配置<b class='flag-5'>多功能</b>柵極數(shù)據(jù)手冊(cè)

    開(kāi)源獲獎(jiǎng)案例】AI智能交互新方案:基于T5L智能屏的AI DeepSeek大模型

    ——來(lái)自迪文開(kāi)發(fā)者論壇本期為大家推送迪文開(kāi)發(fā)者論壇獲獎(jiǎng)開(kāi)源案例——AI智能交互新方案:基于T5L智能屏的AIDeepSeek大模型。該方案通過(guò)T5L串口與AI模塊開(kāi)發(fā)板進(jìn)行數(shù)據(jù)交互,支持用戶與屏幕智能實(shí)時(shí)對(duì)話交互,并同步展示動(dòng)態(tài)表情,構(gòu)建了具有情感化交互能力的AI終端解決
    的頭像 發(fā)表于 07-12 09:02 ?1078次閱讀
    【<b class='flag-5'>開(kāi)源</b><b class='flag-5'>獲獎(jiǎng)</b>案例】AI智能交互新方案:基于T5L智能屏的AI DeepSeek大模型

    千方科技推出多功能交通調(diào)查站解決方案

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

    稱重控制儀表通過(guò)工業(yè)網(wǎng)關(guān)數(shù)據(jù)采集到MES系統(tǒng)中

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

    開(kāi)源獲獎(jiǎng)案例】基于T5L智能屏的音樂(lè)播放與歌詞顯示方案

    ——來(lái)自迪文開(kāi)發(fā)者論壇本期為大家推送迪文開(kāi)發(fā)者論壇獲獎(jiǎng)開(kāi)源案例——基于T5L智能屏的音樂(lè)播放與歌詞顯示方案。該方案通過(guò)T5L串口與通用開(kāi)發(fā)板、解碼板進(jìn)行數(shù)據(jù)交互,將解析完成的音頻和歌詞通過(guò)串口發(fā)送給智能屏,實(shí)現(xiàn)音樂(lè)播放、歌詞顯示、歌曲播放進(jìn)度控制等
    的頭像 發(fā)表于 05-08 09:52 ?865次閱讀
    【<b class='flag-5'>開(kāi)源</b><b class='flag-5'>獲獎(jiǎng)</b>案例】基于T5L智能屏的音樂(lè)播放與歌詞顯示方案

    開(kāi)源獲獎(jiǎng)案例】基于T5L智能屏的零食機(jī)

    ——來(lái)自迪文開(kāi)發(fā)者論壇本期為大家推送迪文開(kāi)發(fā)者論壇獲獎(jiǎng)開(kāi)源案例——基于T5L智能屏的零食機(jī)。該方案基于T5L芯片,通過(guò)PWM接口實(shí)現(xiàn)實(shí)時(shí)調(diào)控爪子抓取力度、速度,并支持后臺(tái)按鍵長(zhǎng)按時(shí)間讀取,各模塊自檢
    的頭像 發(fā)表于 04-30 18:20 ?676次閱讀
    【<b class='flag-5'>開(kāi)源</b><b class='flag-5'>獲獎(jiǎng)</b>案例】基于T5L智能屏的零食機(jī)

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

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

    基于stm32設(shè)計(jì)一個(gè)多功能體重秤

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

    開(kāi)源獲獎(jiǎng)案例】基于T5L智能屏的FM收音機(jī)

    ——來(lái)自迪文開(kāi)發(fā)者論壇本期為大家推送迪文開(kāi)發(fā)者論壇獲獎(jiǎng)開(kāi)源案例——基于T5L智能屏的FM收音機(jī)。該方案基于T5L智能屏,通過(guò)串口4與FM收音機(jī)模塊進(jìn)行通訊,實(shí)現(xiàn)自動(dòng)搜索獲取不同頻段電臺(tái),同時(shí)支持選臺(tái)、頻率調(diào)節(jié)、音量控制等功能,為
    的頭像 發(fā)表于 03-28 15:39 ?941次閱讀
    【<b class='flag-5'>開(kāi)源</b><b class='flag-5'>獲獎(jiǎng)</b>案例】基于T5L智能屏的FM收音機(jī)