久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 9236|回復: 15
打印 上一主題 下一主題
收起左側

stm32溫濕度-超聲波-LCD1602結合項目 附Proteus仿真程序

  [復制鏈接]
跳轉到指定樓層
樓主
程序實現功能:
程序基于stm32芯片實現了控制LED燈亮滅、按鍵控制、串口通信、電機控制、溫濕度數據采集、超聲波測距、LCD顯示屏顯示內容這幾個功能,并用proteus8進行仿真。
1.電路圖
     1、我設計的電路圖如下所示:
仿真原理圖如下(proteus仿真工程文件可到本帖附件中下載)

2. 程序功能介紹
程序總共包括控制LED燈亮滅、按鍵控制、串口通信、電機控制、溫濕度數據采集、超聲波測距、LCD顯示屏顯示內容這幾個功能,以下是這些功能的介紹:
2.1. LED燈亮滅與按鍵控制
程序默認運行時,兩個LED燈會被點亮。當按下按鈕后,兩個LED燈會閃爍。

2.2. 串口通信
程序運行時,虛擬終端接串口通信用到的接收端和發送端,通過配置波特率、傳輸的奇偶校驗位、停止位、字長以及重定向,將printf函數打印的內容打印到虛擬終端上。
2.3. 電機的控制
通過L298芯片,改變功率,來控制電機的轉動。

2.4. 溫濕度數據采集
DHT11溫濕度傳感器來采集溫濕度信息。
通過了解DHT11的工作時序,設計好對應的延時函數,進行數據采集,同時通過循環將每次采集的數據打印在虛擬終端上。
2.5. 超聲波測距
通過超聲波測距模塊來進行測距。
通過了解超聲波測距模塊的時序,利用定時器,采集測到的距離,并且通過循環打印在虛擬終端上。
2.6. LCD液晶顯示器顯示數據
客戶端可以通過發送database”字符串進入到數據庫的相關服務,在選擇相應功能執行。如下圖所示:
通過了解LM16016l中各引腳功能,相關控制指令以及寫時序和讀時序,在程序運行時,在顯示屏上打印“hello”。
3.具體代碼如下:
* 文件名  : UltrasonicWave.c
* 描述    :超聲波測距模塊,UltrasonicWave_Configuration()函數
             初始化超聲模塊,UltrasonicWave_StartMeasure()函數
                         啟動測距,并將測得的數據通過串口1打印出來         
* 實驗平臺:野火STM32開發板
* 硬件連接:------------------
*          | PC8  - TRIG      |
*          | PC9  - ECHO      |
*           ------------------
* 庫版本  :ST3.5.0
UltrasonicWave.H

  1. #ifndef __UltrasonicWave_H
  2. #define        __UltrasonicWave_H

  3. void UltrasonicWave_Configuration(void);               //對超聲波模塊初始化
  4. void UltrasonicWave_StartMeasure(void);                //開始測距,發送一個>10us的脈沖,然后測量返回的高電平時間

  5. #endif /* __UltrasonicWave_H */
復制代碼

UltrasonicWave.c
*********************************************************************************/
#include "./Wave/UltrasonicWave.h"
#include "./usart/bsp_usart.h"
#include "./Tim2/TIM2.h"

#define        TRIG_PORT      GPIOC                //TRIG      
#define        ECHO_PORT      GPIOC                //ECHO
#define        TRIG_PIN       GPIO_Pin_8   //TRIG      
#define        ECHO_PIN       GPIO_Pin_9        //ECHO   

unsigned short int UltrasonicWave_Distance;      //計算出的距離   

/*
* 函數名:DelayTime_us
* 描述  :1us延時函數
* 輸入  :Time           延時的時間 US
* 輸出  :無        
*/
void DelayTime_us(int Time)   
{
   unsigned char i;
   for ( ; Time>0; Time--)
     for ( i = 0; i < 72; i++ );
}

/*
* 函數名:UltrasonicWave_Configuration
* 描述  :超聲波模塊的初始化
* 輸入  :無
* 輸出  :無        
*/
void UltrasonicWave_Configuration(void)
{
  GPIO_InitTypeDef GPIO_InitStructure;        
                 
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);
   
  GPIO_InitStructure.GPIO_Pin = TRIG_PIN;                                         //PC8接TRIG
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;                     //設為推挽輸出模式
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;                 
  GPIO_Init(TRIG_PORT, &GPIO_InitStructure);                         //初始化外設GPIO

  GPIO_InitStructure.GPIO_Pin = ECHO_PIN;                                     //PC9接ECH0
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;                 //設為輸入
  GPIO_Init(ECHO_PORT,&GPIO_InitStructure);                                                 //初始化GPIOA
}

/*
* 函數名:UltrasonicWave_CalculateTime
* 描述  :計算距離
* 輸入  :無
* 輸出  :無        
*/
void UltrasonicWave_CalculateTime(void)
{
   UltrasonicWave_Distance=TIM_GetCounter(TIM2)*5*34/2000;
}

/*
* 函數名:UltrasonicWave_StartMeasure
* 描述  :開始測距,發送一個>10us的脈沖,然后測量返回的高電平時間
* 輸入  :無
* 輸出  :無        
*/
void UltrasonicWave_StartMeasure(void)
{
  GPIO_SetBits(TRIG_PORT,TRIG_PIN);                   //送>10US的高電平
  DelayTime_us(20);                                      //延時20US
  GPIO_ResetBits(TRIG_PORT,TRIG_PIN);
  
  while(!GPIO_ReadInputDataBit(ECHO_PORT,ECHO_PIN));                     //等待高電平
  TIM_Cmd(TIM2, ENABLE);                                             //開啟時鐘
  while(GPIO_ReadInputDataBit(ECHO_PORT,ECHO_PIN));                         //等待低電平
  TIM_Cmd(TIM2, DISABLE);                                                         //定時器2失能
  UltrasonicWave_CalculateTime();                                                                         //計算距離
  TIM_SetCounter(TIM2,0);

        printf("\r\ndistance:%d%d cm\r\n",UltrasonicWave_Distance/256,UltrasonicWave_Distance%256);        
            
}

motor.h
  1. #ifndef __MOTOR_H
  2. #define        __MOTOR_H
  3. #include "stm32f10x.h"
  4. #define  DEBUG_MOTOR_CLK        RCC_APB2Periph_GPIOB
  5. #define  MOTOR_GPIO                        GPIOB
  6. #define         Motor_Pin_1                GPIO_Pin_13        
  7. #define         Motor_Pin_2                GPIO_Pin_14
  8. void motor_init(void);
  9. void motor_stop(void);

  10. #endif
復制代碼
motor.c:
  1. #include <./MOTOR/motor.h>
  2. //初始化電機,讓電機跑起來
  3. void motor_init(void)
  4. {
  5.         GPIO_InitTypeDef GPIO_InitStructure;
  6.         GPIO_InitStructure.GPIO_Pin = Motor_Pin_1 | Motor_Pin_2;
  7.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  8.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  9.         GPIO_Init(MOTOR_GPIO, &GPIO_InitStructure);
  10.         GPIO_SetBits(MOTOR_GPIO,Motor_Pin_1);
  11.         GPIO_ResetBits(MOTOR_GPIO,Motor_Pin_2);
  12. }
  13. //讓電機停止
  14. void motor_stop(void)
  15. {
  16.         GPIO_InitTypeDef GPIO_InitStructure;
  17.         GPIO_InitStructure.GPIO_Pin = Motor_Pin_1 | Motor_Pin_2;
  18.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  19.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  20.         GPIO_Init(MOTOR_GPIO, &GPIO_InitStructure);
  21.         GPIO_SetBits(MOTOR_GPIO,Motor_Pin_1);
  22.         GPIO_SetBits(MOTOR_GPIO,Motor_Pin_2);
  23. }
復制代碼
溫濕度.H
  1. #ifndef __DHT11_H
  2. #define        __DHT11_H
  3. #include "stm32f10x.h"

  4. /************************** DHT11 數據類型定義********************************/
  5. typedef struct
  6. {
  7.         uint8_t  humi_int;                //濕度的整數部分
  8.         uint8_t  humi_deci;                 //濕度的小數部分
  9.         uint8_t  temp_int;                 //溫度的整數部分
  10.         uint8_t  temp_deci;                 //溫度的小數部分
  11.         uint8_t  check_sum;                 //校驗和
  12.                                  
  13. } DHT11_Data_TypeDef;

  14. /************************** DHT11 連接引腳定義********************************/
  15. #define      DHT11_Dout_SCK_APBxClock_FUN              RCC_APB2PeriphClockCmd
  16. #define      DHT11_Dout_GPIO_CLK                       RCC_APB2Periph_GPIOC

  17. #define      DHT11_Dout_GPIO_PORT                      GPIOC
  18. #define      DHT11_Dout_GPIO_PIN                       GPIO_Pin_15

  19. /************************** DHT11 函數宏定義********************************/
  20. #define      DHT11_Dout_0                                    GPIO_ResetBits ( DHT11_Dout_GPIO_PORT, DHT11_Dout_GPIO_PIN )
  21. #define      DHT11_Dout_1                                    GPIO_SetBits ( DHT11_Dout_GPIO_PORT, DHT11_Dout_GPIO_PIN )

  22. #define      DHT11_Dout_IN()                                  GPIO_ReadInputDataBit ( DHT11_Dout_GPIO_PORT, DHT11_Dout_GPIO_PIN )



  23. /************************** DHT11 函數聲明 ********************************/
  24. void                     DHT11_Init                      ( void );
  25. uint8_t                  DHT11_Read_TempAndHumidity      ( DHT11_Data_TypeDef * DHT11_Data );
  26. void dht11_delay_ms(int32_t time);
  27. void dht11_delay_us(int32_t time);

  28. #endif /* __DHT11_H */

復制代碼
溫濕度.c
  1. /**
  2.   ******************************************************************************
  3.   * @file    bsp_dht11.c
  4.   * @author  fire
  5.   * @version V1.0
  6.   * @date    2015-xx-xx
  7.   * @brief   溫濕度傳感器應用函數接口
  8.   ******************************************************************************
  9. */

  10. #include "./dht11/bsp_dht11.h"
  11. #include "./systick/bsp_SysTick.h"
復制代碼

LCD.H
  1. #ifndef __LCD_H
  2. #define        __LCD_H
  3. #include "stm32f10x.h"
  4. /************************** LCD連接引腳定義********************************/
  5. #define      LCD_Dout_SCK_APBxClock_FUN              RCC_APB2PeriphClockCmd
  6. #define      LCD_Dout_GPIO_CLK                       RCC_APB2Periph_GPIOC

  7. /**************************  LCD函數********************************/

  8. void LcdWriteCom(uint8_t com);
  9. void LcdGpioInit(void);
  10. void LcdWriteDate(uint8_t date);
  11. void LCD1602Init(void);
  12. void LCD1602WriteCommand(uint8_t comm);
  13. #endif /* __LCD_H */
復制代碼
LCD.C
  1. #include "./LCD/bsp_lcd.h"  
  2. #include "./systick/bsp_SysTick.h"
  3. uint8_t const table1[]="hello";
  4. /*初始化用到的引腳*/
  5. void LcdGpioInit(void)   
  6. {
  7.         GPIO_InitTypeDef GPIO_InitStruct;
  8.         RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);
  9.          
  10.         GPIO_WriteBit(GPIOC,GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7|GPIO_Pin_10|GPIO_Pin_11|GPIO_Pin_12,Bit_RESET);        
  11.          GPIO_InitStruct.GPIO_Mode = GPIO_Mode_Out_PP;
  12.         GPIO_InitStruct.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7|GPIO_Pin_10|GPIO_Pin_11|GPIO_Pin_12;
  13.   GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
  14.         GPIO_Init ( GPIOC, &GPIO_InitStruct);
  15. }
  16. /*******************************************************************************
  17. * 函 數 名 :write_com
  18. * 函數功能 :LCD1602 寫指令
  19. * 輸    入 :無
  20. * 輸    出 :無
  21. *******************************************************************************/
  22. void LcdWriteCom(uint8_t com)
  23. {
  24.         Delay_us(20);
  25.         GPIOC->BSRR = 0x00ff0000;
  26.         GPIOC->BSRR = (com);
  27.         GPIO_WriteBit(GPIOC,GPIO_Pin_10,Bit_RESET);        //LCDRS
  28.         GPIO_WriteBit(GPIOC,GPIO_Pin_11,Bit_RESET);        //LCDRW
  29.         GPIO_WriteBit(GPIOC,GPIO_Pin_12,Bit_RESET);        //LCDEN
  30.         Delay_us(10);
  31.         GPIO_WriteBit(GPIOC,GPIO_Pin_12,Bit_SET);        //LCDEN
  32.         Delay_us(10);
  33.         GPIO_WriteBit(GPIOC,GPIO_Pin_12,Bit_RESET);        //LCDEN
  34.         Delay_us(10);
  35. }
  36. /*******************************************************************************
  37. * 函 數 名 :write_Date
  38. * 函數功能 :LCD1602 寫數據
  39. * 輸    入 :無
  40. * 輸    出 :無
  41. *******************************************************************************/
  42. void LcdWriteDate(uint8_t date)
  43. {
  44.         Delay_us(20);
  45.         GPIOC->BSRR = 0x00ff0000;
  46.         GPIOC->BSRR = (date);
  47.         GPIO_WriteBit(GPIOC,GPIO_Pin_10,Bit_SET);        //LCDRS
  48.         GPIO_WriteBit(GPIOC,GPIO_Pin_11,Bit_RESET);        //LCDRW
  49.         GPIO_WriteBit(GPIOC,GPIO_Pin_12,Bit_RESET);        //LCDEN
  50.         Delay_us(10);
  51.         GPIO_WriteBit(GPIOC,GPIO_Pin_12,Bit_SET);        //LCDEN
  52.         Delay_us(10);
  53.         GPIO_WriteBit(GPIOC,GPIO_Pin_12,Bit_RESET);        //LCDEN
  54.         Delay_us(10);
  55. }
  56. /*******************************************************************************
  57. * 函 數 名 :LCD1602Init
  58. * 函數功能 :LCD1602初始化
  59. * 輸    入 :無
  60. * 輸    出 :無
  61. *******************************************************************************/
  62. void LCD1602Init(void)
  63. {
  64.         uint8_t index=0;
  65.         Delay_ms(10);
  66.         LcdWriteCom(0x38);  //設置16*2顯示,8位數據接口
  67.         LcdWriteCom(0x0c); //開顯示,顯示光標且閃爍
  68.         LcdWriteCom(0x06);//寫一個指針自動加一
  69.         LcdWriteCom(0x01);//清屏  
  70.         Delay_ms(10);//延時一段時間時間,等待LCD1602穩定        
  71.         
  72.         LcdWriteCom(0x80);//設置第一行 數據地址指針
  73.         for(index=0;index<13;index++)
  74.                 LcdWriteDate(table1[index]);  //寫入數據
  75.         
  76. //        LcdWriteCom(0xc0);//設置第二行 數據地址指針
  77. //        for(index=0;index<7;index++)
  78. //                LcdWriteDate(table2[index]);  //寫入數據
  79. }
  80. /*******************************************************************************
  81. * 函 數 名 :LCD1602WriteCommand
  82. * 函數功能 :顯示指令到屏幕 U D L R S
  83. * 輸    入 :comm 字符格式
  84. * 輸    出 :無
  85. *******************************************************************************/
  86. void LCD1602WriteCommand(uint8_t comm)
  87. {
  88.         LcdWriteCom(0xc0 + 14);
  89.         LcdWriteDate(comm);  //寫入數據   
  90. }
復制代碼
main.c
  1. /**
  2.   ******************************************************************************
  3.   * @file    main.c
  4.   * @author  fire
  5.   * @version V1.0
  6.   * @date    2020-xx-xx
  7.   * @brief   dht11溫濕度傳感器測試實驗
  8.   ******************************************************************************
  9. */
  10.   
  11. #include "stm32f10x.h"
  12. #include "./systick/bsp_SysTick.h"
  13. #include "./dht11/bsp_dht11.h"
  14. #include "./usart/bsp_usart.h"
  15. #include "./Key/bsp_key.h"
  16. #include "./Led/bsp_led.h"
  17. #include "./LCD/bsp_lcd.h"
  18. #include "./MOTOR/motor.h"
  19. #include "./Tim2/TIM2.h"
  20. #include "./Wave/UltrasonicWave.h"
  21. /**
  22.   * @brief  主函數
  23.   * @param  無  
  24.   * @retval 無
  25.   */
  26. int main(void)
  27. {
  28.         
  29.         DHT11_Data_TypeDef DHT11_Data;
  30.         RCC_SYSCLKConfig(RCC_SYSCLKSource_HSI);
  31.         
  32.         
  33.         /* 配置SysTick 為1us中斷一次 */
  34.         SysTick_Init();
  35.         LED_GPIO_Config();
  36.         //LED1_ON;
  37.         LED2_ON;
  38.         LED3_ON;
  39.         motor_init();
  40.         //NVIC_Configuration();
  41.         TIM2_Configuration();
  42.         UltrasonicWave_Configuration();
  43.         LcdGpioInit();
  44.         LCD1602Init();

  45.         USART_Config();//初始化串口1
  46.         NVIC_Configuration();
  47.         printf("\r\n***秉火STM32 dht11 溫濕度傳感器實驗***\r\n");

  48.         /*初始化DTT11的引腳*/
  49.         DHT11_Init();
  50.         //printf("22\n");

  51.         UltrasonicWave_StartMeasure();
  52.                                 dht11_delay_ms(100);
  53.         while(1)
  54.         {
  55.                         //調用DHT11_Read_TempAndHumidity讀取溫濕度,若成功則輸出該信息
  56.                         if( DHT11_Read_TempAndHumidity ( & DHT11_Data ) == SUCCESS)
  57.                         {
  58.                         
  59.                                 printf("\r\n讀取DHT11成功!\r\n\r\n濕度為%d.%d %RH ,溫度為 %d.%d℃ \r\n",DHT11_Data.humi_int,DHT11_Data.humi_deci,DHT11_Data.temp_int,DHT11_Data.temp_deci);
  60.                         }                        
  61.                         else
  62.                         {
  63.                                 printf("Read DHT11 ERROR!\r\n");
  64.                         }
  65.                         Delay_ms(100);
  66.                         UltrasonicWave_StartMeasure();
  67.                                 dht11_delay_ms(100);
  68.                
  69.                         
  70.                         
  71.                         
  72.                         if( Key_Scan(KEY1_GPIO_PORT,KEY1_GPIO_PIN) == KEY_ON  )
  73.                         {
  74.                                 /*LED2關閉*/
  75.                                 LED2_OFF;
  76.                                 motor_init();
  77.                                 
  78.                                 
  79.                         }

  80.                         if( Key_Scan(KEY2_GPIO_PORT,KEY2_GPIO_PIN) == KEY_ON  )
  81.                         {
  82.                                 /*LED3關閉*/
  83.                                 LED3_OFF;        
  84.                         }               
  85.                         
  86.                
  87.                
  88.                
  89.                         
  90.         }
  91.         return 0;

  92.         
  93. }
  94. /*********************************************END OF FILE**********************/
復制代碼

全部資料51hei下載地址:
stm32溫濕度-超聲波-LCD結合項目.7z (540.61 KB, 下載次數: 773)


評分

參與人數 1黑幣 +50 收起 理由
admin + 50 共享資料的黑幣獎勵!

查看全部評分

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏12 分享淘帖 頂3 踩
回復

使用道具 舉報

沙發
ID:304785 發表于 2020-7-16 23:44 | 只看該作者
這個是牛的,給樓主點個贊
回復

使用道具 舉報

板凳
ID:139339 發表于 2020-7-30 00:23 | 只看該作者
看到能仿真成功,我也試試
回復

使用道具 舉報

地板
ID:935902 發表于 2021-6-14 19:04 | 只看該作者
為什么keil5顯示

..\..\Output\DHT11.axf: error: L6002U: Could not open file ..\..\output\core_cm3.o: No such file or directory
Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.
"..\..\Output\DHT11.axf" - 1 Error(s), 5 Warning(s).
Target not created.
Build Time Elapsed:  00:00:10
回復

使用道具 舉報

5#
ID:934599 發表于 2021-6-15 09:16 | 只看該作者
LCD液晶顯示器怎么修改顯示
回復

使用道具 舉報

6#
ID:935902 發表于 2021-6-17 11:20 | 只看該作者
撞南墻 發表于 2021-6-14 19:04
為什么keil5顯示

..\..\Output\DHT11.axf: error: L6002U: Could not open file ..\..\output\core_cm3. ...

把if 改成else if 好了
回復

使用道具 舉報

7#
ID:935902 發表于 2021-6-17 11:22 | 只看該作者
撞南墻 發表于 2021-6-14 19:04
為什么keil5顯示

..\..\Output\DHT11.axf: error: L6002U: Could not open file ..\..\output\core_cm3. ...

因為用戶名是中文的原因
回復

使用道具 舉報

8#
ID:387687 發表于 2022-3-14 12:55 | 只看該作者

看到能仿真成功,我也試試
回復

使用道具 舉報

9#
ID:972656 發表于 2022-5-25 19:07 | 只看該作者
在仿真中
回復

使用道具 舉報

10#
ID:972656 發表于 2022-5-25 19:16 | 只看該作者
*** Using Compiler 'V5.06 update 1 (build 61)', folder: 'E:\keil\ARM\ARMCC\Bin'
Build target 'Target 1'
compiling UltrasonicWave.c...
UltrasonicWave.c(1): error:  #5: cannot open source input file "./Wave/UltrasonicWave.h": No such file or directory
  #include "./Wave/UltrasonicWave.h"
UltrasonicWave.c: 0 warnings, 1 error
compiling w.c...
w.c(11): error:  #5: cannot open source input file "./dht11/bsp_dht11.h": No such file or directory
  #include "./dht11/bsp_dht11.h"
w.c: 0 warnings, 1 error
compiling LCD.c...
LCD.c(1): error:  #5: cannot open source input file "LCD/bsp_LCD.h": No such file or directory
  #include "LCD/bsp_LCD.h"  
LCD.c: 0 warnings, 1 error
compiling main.c...
E:\keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.5\Device\Include\stm32f10x.h(96): error:  #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
   #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
main.c: 0 warnings, 1 error
".\Objects\1.axf" - 4 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:  00:00:00
回復

使用道具 舉報

11#
ID:972656 發表于 2022-5-25 19:36 | 只看該作者
   #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
回復

使用道具 舉報

12#
ID:972656 發表于 2022-5-25 21:35 | 只看該作者
撞南墻 發表于 2021-6-14 19:04
為什么keil5顯示

..\..\Output\DHT11.axf: error: L6002U: Could not open file ..\..\output\core_cm3. ...

你這個好像是目標沒有創建
回復

使用道具 舉報

13#
ID:1020198 發表于 2022-5-29 10:56 | 只看該作者
試了一下能仿真成功,牛!
回復

使用道具 舉報

14#
ID:1045113 發表于 2023-4-15 22:25 | 只看該作者
測量出來的距離誤差有點大,把UltrasonicWave_Distance=TIM_GetCounter(TIM2)*5*34/2000;
改成UltrasonicWave_Distance=TIM_GetCounter(TIM2)*0.79;
會好很多
回復

使用道具 舉報

15#
ID:743691 發表于 2023-4-17 18:41 | 只看該作者
看到能仿真成功,我也試試,不知道8.8能不能行
回復

使用道具 舉報

16#
ID:1103550 發表于 2025-3-7 20:53 | 只看該作者
仿真不了啊。。LCD和串口都沒反應。。
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 97人人爱 | 国产在线观看一区二区三区 | 欧美一区二区三区 | 亚洲国产精久久久久久久 | 午夜精品一区二区三区在线视频 | 综合色久| 亚洲在线日韩 | 精品美女 | 中文字幕高清在线 | 欧美日韩亚洲视频 | 成人在线免费 | 亚洲精品久久久久久久久久吃药 | 国产婷婷精品av在线 | 久久久精选 | 男女羞羞在线观看 | 成人av免费 | 欧美性生活网 | 成人天堂噜噜噜 | 欧美在线一区二区三区 | 成人黄在线观看 | 精品一区二区三区中文字幕 | 欧美精品乱码久久久久久按摩 | 欧州一区二区 | 日韩视频国产 | 三级在线免费观看 | 国产精品2 | 五月天婷婷丁香 | 国产在线永久免费 | 亚洲精品视频在线播放 | 国产精品美女视频 | 欧美中文字幕一区二区 | 日韩一区二区三区四区五区 | 免费视频99 | 男女激情网站免费 | 国产精品海角社区在线观看 | 日本久久视频 | 中文字幕 在线观看 | 成人免费在线电影 | 国产精品成人一区二区 | 久久久精选 | 蜜桃一区二区三区 |