在线观看www成人影院-在线观看www日本免费网站-在线观看www视频-在线观看操-欧美18在线-欧美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();}

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

    關注

    2561

    文章

    52199

    瀏覽量

    761832
  • 開源
    +關注

    關注

    3

    文章

    3533

    瀏覽量

    43304
  • 智能屏幕
    +關注

    關注

    0

    文章

    68

    瀏覽量

    3571
收藏 人收藏

    評論

    相關推薦

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

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

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

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

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

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

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

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

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

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

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

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

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

    ——來自迪文開發者論壇本期為大家推送迪文開發者論壇獲獎開源案例——基于T5L智能屏的汽車抬頭顯示方案。該方案采用COF智能屏,通過T5LCAN接口,實時獲取汽車OBDII診斷接口的數據,并將接收到的車速和轉速數據同步顯示在屏幕
    的頭像 發表于 09-24 08:03 ?569次閱讀
    【<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>引腳及其應用的簡介

    開源獲獎案例】基于T5L智能屏的指紋識別解決方案

    ——來自迪文開發者論壇本期為大家推送迪文開發者論壇獲獎開源案例——基于T5L智能屏的指紋識別解決方案。該方案通過智能屏串口進行Modbus通訊,實現對指紋識別模塊的精準控制,并集成了指紋錄入與識別功能。可用于門禁管理、員工考勤、
    的頭像 發表于 07-06 08:13 ?568次閱讀
    【<b class='flag-5'>開源</b><b class='flag-5'>獲獎</b>案例】基于T5L智能屏的指紋識別解決方案

    稱重傳感器的選型及注意事項

    稱重傳感器的選型及注意事項 稱重傳感器實際上是一種將質量信號轉變為可測量的電信號輸出的裝置。用傳感應先要考慮傳感所處的實際工作環境,這點對正確選用
    的頭像 發表于 06-17 18:33 ?1392次閱讀

    12芯M16插頭連接多功能

      德索工程師說道12芯M16插頭連接,作為電氣連接領域的一顆璀璨明珠,憑借其獨特的設計和卓越的性能,展現了其卓越的多功能性。以下是對其多功能性的詳細解析:
    的頭像 發表于 06-15 18:00 ?514次閱讀
    12芯M16插頭連接<b class='flag-5'>器</b>的<b class='flag-5'>多功能</b>性

    基于T5L芯片的多功能物聯網開發套件

    ——來自迪文開發者論壇本期為大家推送迪文開發者論壇獲獎開源案例——基于T5L芯片的多功能物聯網開發套件。工程師充分運用了T5L1芯片的豐富外設功能,集成了USB、音頻喇叭、PWM信號接
    的頭像 發表于 06-14 08:13 ?1024次閱讀
    基于T5L芯片的<b class='flag-5'>多功能</b>物聯網開發套件

    使用多功能數顯表的步驟 使用多功能數顯表的注意事項

    多功能數顯表是一種集成了多種測量功能的電子測試儀器,它能夠測量電壓、電流、電阻、溫度、頻率等電氣參數。
    的頭像 發表于 05-09 16:36 ?3255次閱讀

    多功能數顯表的功能特點有哪些?

    多功能數顯表是一種集成了多種測量功能的數字顯示儀表,它在工業自動化、電氣測試、實驗室研究以及現場服務等領域有著廣泛的應用。
    的頭像 發表于 05-09 16:26 ?1648次閱讀
    主站蜘蛛池模板: 婷婷九月色 | 午夜影院黄色片 | 国产免费高清福利拍拍拍 | 国产精品午夜在线观看 | 国产免费高清视频在线观看不卡 | 在线观看日本免费不卡 | 免费理论片在线观看播放 | 天堂a免费视频在线观看 | 婷婷丁香六月天 | 天天草狠狠干 | 免费啪视频 | 国产精品午夜国产小视频 | 欧美69xx性欧美 | 永久免费的拍拍拍网站 | 狠狠干综合 | 亚洲国产精品久久久久婷婷软件 | 日本最顶级丰满的aⅴ艳星 日本最好的免费影院 | 午夜毛片在线观看 | 婷婷影院在线综合免费视频 | 大量喷潮free| 亚洲一区二区三区中文字幕 | 人与牲动交xx | 日本不卡在线视频 | 亚洲视频久久 | 热99在线视频 | 两性色视频 | 亚洲黄色录像 | 国产精品免费看久久久久 | 男女交性拍拍拍高清视频 | 人人成人免费公开视频 | 天堂视频免费 | 天天舔天天干 | 亚洲一区亚洲二区 | 久久综合九色婷婷97 | 色香天天| 人人艹人人干 | 免费黄色三级 | 国产乱码1卡一卡二卡 | 久久作爱视频 | 色婷婷一区二区三区四区成人 | 日本特黄特色aaa大片免费欧 |