99精品伊人亚洲|最近国产中文炮友|九草在线视频支援|AV网站大全最新|美女黄片免费观看|国产精品资源视频|精彩无码视频一区|91大神在线后入|伊人终合在线播放|久草综合久久中文

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)注

    2566

    文章

    53008

    瀏覽量

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

    關(guān)注

    3

    文章

    3690

    瀏覽量

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

    關(guān)注

    0

    文章

    72

    瀏覽量

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

掃碼添加小助手

加入工程師交流群

    評(píng)論

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

    千方科技推出多功能交通調(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 ?233次閱讀

    稱重控制儀表通過(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 ?200次閱讀

    開(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 ?257次閱讀
    【<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 ?212次閱讀
    【<b class='flag-5'>開(kāi)源</b><b class='flag-5'>獲獎(jiǎng)</b>案例】基于T5L智能屏的零食機(jī)

    基于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 ?419次閱讀
    【<b class='flag-5'>開(kāi)源</b><b class='flag-5'>獲獎(jiǎng)</b>案例】基于T5L智能屏的FM收音機(jī)

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

    S型稱重傳感器是傳感領(lǐng)域中一種常見(jiàn)且重要的設(shè)備,廣泛應(yīng)用于工業(yè)生產(chǎn)和包裝行業(yè)等領(lǐng)域。本文將詳細(xì)介紹S型稱重傳感器的工作原理、選擇要點(diǎn)以及使用說(shuō)明,以期為相關(guān)行業(yè)從業(yè)者提供有價(jià)值的參考。 一、S型
    的頭像 發(fā)表于 03-04 18:27 ?398次閱讀
    S型<b class='flag-5'>稱重傳感器</b>的原理與選擇使用

    開(kāi)源獲獎(jiǎng)案例】基于T5L智能屏的EQ均衡效果

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

    多功能智慧路燈系統(tǒng)整體解決方案介紹

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

    安科瑞ADF400L多功能電表產(chǎn)品簡(jiǎn)單介紹

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

    多功能UC1834優(yōu)化線性調(diào)節(jié)效率

    電子發(fā)燒友網(wǎng)站提供《多功能UC1834優(yōu)化線性調(diào)節(jié)效率.pdf》資料免費(fèi)下載
    發(fā)表于 10-24 09:51 ?0次下載
    <b class='flag-5'>多功能</b>UC1834優(yōu)化線性調(diào)節(jié)<b class='flag-5'>器</b>效率

    物聯(lián)網(wǎng)行業(yè)中的智能稱重方案介紹_稱重傳感器分析

    物聯(lián)網(wǎng)系統(tǒng)中為什么要使用稱重傳感器 ??聯(lián)網(wǎng)系統(tǒng)中使用稱重傳感器的原因主要有以下幾點(diǎn): 全面感知與信息采集 基礎(chǔ)感知元件:傳感是物聯(lián)網(wǎng)的感覺(jué)器官,能夠感知、探測(cè)、采集和獲取目標(biāo)對(duì)象各種形態(tài)的信息
    的頭像 發(fā)表于 09-24 14:30 ?1024次閱讀
    物聯(lián)網(wǎng)行業(yè)中的智能<b class='flag-5'>稱重</b>方案介紹_<b class='flag-5'>稱重傳感器</b>分析

    開(kāi)源獲獎(jiǎng)案例】基于T5L智能屏的汽車(chē)抬頭顯示方案

    ——來(lái)自迪文開(kāi)發(fā)者論壇本期為大家推送迪文開(kāi)發(fā)者論壇獲獎(jiǎng)開(kāi)源案例——基于T5L智能屏的汽車(chē)抬頭顯示方案。該方案采用COF智能屏,通過(guò)T5LCAN接口,實(shí)時(shí)獲取汽車(chē)OBDII診斷接口的數(shù)據(jù),并將接收到的車(chē)速和轉(zhuǎn)速數(shù)據(jù)同步顯示在屏幕
    的頭像 發(fā)表于 09-24 08:03 ?721次閱讀
    【<b class='flag-5'>開(kāi)源</b><b class='flag-5'>獲獎(jiǎng)</b>案例】基于T5L智能屏的汽車(chē)抬頭顯示<b class='flag-5'>器</b>方案

    TI 降壓轉(zhuǎn)換多功能引腳及其應(yīng)用的簡(jiǎn)介

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

    多功能引腳及其在TI降壓轉(zhuǎn)換中的應(yīng)用

    電子發(fā)燒友網(wǎng)站提供《多功能引腳及其在TI降壓轉(zhuǎn)換中的應(yīng)用.pdf》資料免費(fèi)下載
    發(fā)表于 08-26 14:35 ?0次下載
    <b class='flag-5'>多功能</b>引腳及其在TI降壓轉(zhuǎn)換<b class='flag-5'>器</b>中的應(yīng)用