chinese直男口爆体育生外卖, 99久久er热在这里只有精品99, 又色又爽又黄18禁美女裸身无遮挡, gogogo高清免费观看日本电视,私密按摩师高清版在线,人妻视频毛茸茸,91论坛 兴趣闲谈,欧美 亚洲 精品 8区,国产精品久久久久精品免费

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

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

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

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

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

掃碼添加小助手

加入工程師交流群

——來自迪文開發(fā)者論壇

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


UI開發(fā)示例

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

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

//計價頁面===================#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();}

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

    關(guān)注

    2576

    文章

    54865

    瀏覽量

    789636
  • 開源
    +關(guān)注

    關(guān)注

    3

    文章

    4154

    瀏覽量

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

    關(guān)注

    0

    文章

    73

    瀏覽量

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

掃碼添加小助手

加入工程師交流群

    評論

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    安富利推動多功能機器人的發(fā)展和應(yīng)用

    在科技的前沿,多功能機器人(Polyfunctional Robots)正逐漸成為工業(yè)和生活場景中的關(guān)鍵力量。
    的頭像 發(fā)表于 02-27 18:08 ?1309次閱讀
    安富利推動<b class='flag-5'>多功能</b>機器人的發(fā)展和應(yīng)用

    如何連接稱重傳感器,安裝稱重傳感器要記住的正確方式

    最常見的應(yīng)用之一是從稱重傳感器或任何全橋式傳感(例如帶有A/D板的應(yīng)變計電橋)獲取數(shù)據(jù)。也是最不了解的,很多用戶會犯簡單的接線錯誤,造成噪音過大,極端情況下還會損壞傳感和儀表。
    的頭像 發(fā)表于 02-17 15:58 ?1468次閱讀
    如何連接<b class='flag-5'>稱重傳感器</b>,安裝<b class='flag-5'>稱重傳感器</b>要記住的正確方式

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

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

    稱重傳感器故障檢測方法與策略探究

    在現(xiàn)代工業(yè)自動化和物流運輸?shù)阮I(lǐng)域,稱重傳感器作為關(guān)鍵的測量設(shè)備,扮演著舉足輕重的角色。它們能夠精確測量物體的重量,為生產(chǎn)控制、物料管理及運輸安全提供可靠的數(shù)據(jù)支持。然而,由于長期工作于復(fù)雜多變的環(huán)境
    的頭像 發(fā)表于 02-07 08:38 ?1126次閱讀
    <b class='flag-5'>稱重傳感器</b>故障檢測方法與策略探究