【STM32G431RBTx】备战蓝桥杯嵌入式→省赛试题→第十四届

本文主要是介绍【STM32G431RBTx】备战蓝桥杯嵌入式→省赛试题→第十四届,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

文章目录

    • 前言
    • 一、题目
    • 二、模块初始化
    • 三、代码实现
      • interrupt.h:
      • interrupt.c:
      • main.h:
      • main.c:
    • 四、完成效果
    • 五、总结

前言

一、题目

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

二、模块初始化

1.LCD这里不用配置,直接使用提供的资源包就行
2.KEY, 四个按键IO口都要配置,分别是PB0, PB1,PB2,PA0依次是B0,B1,B2,B3不要弄错了
3.LED:开启PC8,PC9,PD2输出模式就行了。
4.定时器:TIM3(按键消抖定时器):PSC:80-1,ARR:10000-1,TIM2CH2(PA1PWM占空比以及频率):PSC:100-1,ARR:200-1,TIM4(低高频转换时间控制,LED闪烁控制,统计数据时间控制):PSC:80-1,ARR:9999,TIM17输入捕获采集。

三、代码实现

bsp组中共有:
在这里插入图片描述

interrupt.h:

#ifndef __INTERRUPT_H__
#define __INTERRUPT_H__#include "main.h"
#include "stdbool.h"struct keys
{bool key_sta;unsigned char judge_sta;unsigned int key_time;bool single_flag;bool long_flag;
};#endif

interrupt.c:

#include "interrupt.h"
#include "tim.h"struct keys key[4] = {0, 0, 0, 0, 0};extern unsigned char PA1changingFlag;
extern unsigned int PA1changingTick;
extern unsigned int PA1Fre;
extern unsigned char PA1OutputMode;
extern unsigned int N;
extern float V;
float VHregister = 0.0;
unsigned int VHcompareTick = 0;
float VLregister = 0.0;
unsigned int VLcompareTick = 0;
extern float MH;
extern float ML;
extern unsigned char LED;void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef * htim)
{if(htim->Instance == TIM3){key[0].key_sta = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_0);key[1].key_sta = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_1);key[2].key_sta = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_2);key[3].key_sta = HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_0);for(unsigned char i = 0; i < 4; i++){switch(key[i].judge_sta){case 0:{if(key[i].key_sta == 0){key[i].judge_sta = 1;key[i].key_time = 0;}break;}case 1:{if(key[i].key_sta == 0){key[i].judge_sta = 2;}else{key[i].judge_sta = 0;}break;}case 2:{if(key[i].key_sta == 1){key[i].judge_sta = 0;if(key[i].key_time <= 200){key[i].single_flag = 1;}else if(key[i].key_time > 200){key[i].long_flag = 1;}}else{key[i].key_time++;}break;}}}}if(htim->Instance ==TIM4){if(PA1changingFlag == 1){if(PA1OutputMode == LOWFRE){PA1changingTick++;if(PA1changingTick % 10 == 0)LED ^= 0x02;PA1Fre += 8;__HAL_TIM_SET_PRESCALER(&htim2, (80000000 / 200 / PA1Fre) - 1);if(PA1changingTick >= 500){PA1changingTick = 0;PA1changingFlag = 0;PA1OutputMode = HIGHFRE;LED &= ~(0x02);N++;}}else if(PA1OutputMode == HIGHFRE){PA1changingTick++;if(PA1changingTick % 10 == 0)LED ^= 0x02;PA1Fre -= 8;__HAL_TIM_SET_PRESCALER(&htim2, (80000000 / 200 / PA1Fre) - 1);if(PA1changingTick >= 500){PA1changingTick = 0;PA1changingFlag = 0;PA1OutputMode = LOWFRE;LED &= ~(0x02);N++;}}}if(PA1OutputMode == HIGHFRE){if(VHcompareTick >= 200){if((unsigned int)(VHregister * 10) == (unsigned int)(V * 10)){MH = VHregister;VHcompareTick = 0;}}else{VHcompareTick++;if((unsigned int)(VHregister * 10) != (unsigned int)(V * 10)){VHcompareTick = 0;}}VHregister = V;}else if(PA1OutputMode == LOWFRE){if(VLcompareTick >= 200){if((unsigned int)(VLregister * 10) == (unsigned int)(V * 10)){ML = VLregister;VLcompareTick = 0;}}else{VLcompareTick++;if((unsigned int)(VLregister * 10) != (unsigned int)(V * 10)){VLcompareTick = 0;}}VLregister = V;}}
}/* Captured Values */
uint32_t uwIC1Value1_T17CH1 = 0;
uint32_t uwIC1Value2_T17CH1 = 0;
uint32_t uwHighCapture_T17CH1 = 0;
uint32_t uwLowCapture_T17CH1 = 0;/* Capture index */
uint16_t uhCaptureIndex_T17CH1 = 0;/* Frequency Value */
uint32_t uwFrequency_T17CH1 = 0;
float uwDuty_T17CH1 = 0;void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim)
{if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_1){if(uhCaptureIndex_T17CH1 == 0){/* Get the 1st Input Capture value */uwIC1Value1_T17CH1 = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_1);__HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_1, TIM_INPUTCHANNELPOLARITY_FALLING);uhCaptureIndex_T17CH1 = 1;}else if(uhCaptureIndex_T17CH1 == 1){/* Get the 2nd Input Capture value */uwIC1Value2_T17CH1 = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_1); __HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_1, TIM_INPUTCHANNELPOLARITY_RISING);/* Capture computation */if (uwIC1Value2_T17CH1 > uwIC1Value1_T17CH1){uwHighCapture_T17CH1 = (uwIC1Value2_T17CH1 - uwIC1Value1_T17CH1); }else if (uwIC1Value2_T17CH1 < uwIC1Value1_T17CH1){/* 0xFFFF is max TIM1_CCRx value */uwHighCapture_T17CH1 = ((0xFFFF - uwIC1Value1_T17CH1) + uwIC1Value2_T17CH1) + 1;}else{/* If capture values are equal, we have reached the limit of frequencymeasures */Error_Handler();}uhCaptureIndex_T17CH1 = 2;uwIC1Value1_T17CH1 = uwIC1Value2_T17CH1;/* Frequency computation: for this example TIMx (TIM1) is clocked byAPB2Clk */      
//      uwFrequency_T17CH1 = 1000000 / uwDiffCapture_T17CH1;
//      uhCaptureIndex_T17CH1 = 0;}else if(uhCaptureIndex_T17CH1 == 2){uwIC1Value2_T17CH1 = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_1); /* Capture computation */if (uwIC1Value2_T17CH1 > uwIC1Value1_T17CH1){uwLowCapture_T17CH1 = (uwIC1Value2_T17CH1 - uwIC1Value1_T17CH1); }else if (uwIC1Value2_T17CH1 < uwIC1Value1_T17CH1){/* 0xFFFF is max TIM1_CCRx value */uwLowCapture_T17CH1 = ((0xFFFF - uwIC1Value1_T17CH1) + uwIC1Value2_T17CH1) + 1;}else{/* If capture values are equal, we have reached the limit of frequencymeasures */Error_Handler();}uwFrequency_T17CH1 = 1000000 / (uwHighCapture_T17CH1 + uwLowCapture_T17CH1);uwDuty_T17CH1 = uwHighCapture_T17CH1 * 100.0 / (uwLowCapture_T17CH1 + uwHighCapture_T17CH1);uhCaptureIndex_T17CH1 = 0;}}
}

main.h:

/* USER CODE BEGIN Header */
/********************************************************************************* @file           : main.h* @brief          : Header for main.c file.*                   This file contains the common defines of the application.******************************************************************************* @attention** Copyright (c) 2024 STMicroelectronics.* All rights reserved.** This software is licensed under terms that can be found in the LICENSE file* in the root directory of this software component.* If no LICENSE file comes with this software, it is provided AS-IS.********************************************************************************/
/* USER CODE END Header *//* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H#ifdef __cplusplus
extern "C" {
#endif/* Includes ------------------------------------------------------------------*/
#include "stm32g4xx_hal.h"/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes *//* USER CODE END Includes *//* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET *//* USER CODE END ET *//* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC *//* USER CODE END EC *//* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM *//* USER CODE END EM *//* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);/* USER CODE BEGIN EFP *//* USER CODE END EFP *//* Private defines -----------------------------------------------------------*//* USER CODE BEGIN Private defines */
#define KA ((85.0 - 10.0)/(3.0 - 1.0)) 
#define DATA 0
#define PARA 1
#define RECD 2
#define LOWFRE 0
#define HIGHFRE 1
/* USER CODE END Private defines */#ifdef __cplusplus
}
#endif#endif /* __MAIN_H */

main.c:

/* USER CODE BEGIN Header */
/********************************************************************************* @file           : main.c* @brief          : Main program body******************************************************************************* @attention** Copyright (c) 2024 STMicroelectronics.* All rights reserved.** This software is licensed under terms that can be found in the LICENSE file* in the root directory of this software component.* If no LICENSE file comes with this software, it is provided AS-IS.********************************************************************************/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "adc.h"
#include "tim.h"
#include "gpio.h"/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "lcd.h"
#include "interrupt.h"
#include "stdio.h"
#include "badc.h"
#include "led.h"
/* USER CODE END Includes *//* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD *//* USER CODE END PTD *//* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD *//* USER CODE END PD *//* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM *//* USER CODE END PM *//* Private variables ---------------------------------------------------------*//* USER CODE BEGIN PV */
extern uint32_t uwFrequency_T17CH1;
extern float uwDuty_T17CH1;
char text[30];
extern struct keys key[4];
float R37Volt;
float PA1Duty;//(0.0%, 100.0%)
unsigned int PA1Fre = 4000; //8hz / 10ms
unsigned char PA1changingFlag;
unsigned int PA1changingTick;
unsigned char PA1OutputMode;
unsigned char DisplayMode;
unsigned int R = 1;
unsigned int K = 1;
unsigned int Rtemp = 1, Ktemp = 1;
unsigned int N = 0;
float V = 0;
float MH;
float ML;
unsigned char SettingRKIndex;
unsigned char PA1DutyLock;
unsigned char LED;
/* USER CODE END PV *//* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
/* USER CODE BEGIN PFP */
void LCD_Disp(void);
void DisposeKey(void);
float DutyReturn(float R37Volt);
/* USER CODE END PFP *//* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 *//* USER CODE END 0 *//*** @brief  The application entry point.* @retval int*/
int main(void)
{/* USER CODE BEGIN 1 *//* USER CODE END 1 *//* MCU Configuration--------------------------------------------------------*//* Reset of all peripherals, Initializes the Flash interface and the Systick. */HAL_Init();/* USER CODE BEGIN Init *//* USER CODE END Init *//* Configure the system clock */SystemClock_Config();/* USER CODE BEGIN SysInit *//* USER CODE END SysInit *//* Initialize all configured peripherals */MX_GPIO_Init();MX_ADC2_Init();MX_TIM2_Init();MX_TIM17_Init();MX_TIM3_Init();MX_TIM4_Init();/* USER CODE BEGIN 2 */LCD_Init();LCD_Clear(Black);LCD_SetBackColor(Black);LCD_SetTextColor(White);HAL_TIM_IC_Start_IT(&htim17, TIM_CHANNEL_1);HAL_TIM_Base_Start_IT(&htim3);HAL_TIM_Base_Start_IT(&htim4);getADC(&hadc2);R37Volt = getADC(&hadc2) * 3.3 / 4096;PA1Duty = DutyReturn(R37Volt);__HAL_TIM_SET_COMPARE(&htim2, TIM_CHANNEL_2, (unsigned int)(PA1Duty * 2));HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_2);LED_Disp(0x00);/* USER CODE END 2 *//* Infinite loop *//* USER CODE BEGIN WHILE */while (1){/* USER CODE END WHILE *//* USER CODE BEGIN 3 */R37Volt = getADC(&hadc2) * 3.3 / 4096;PA1Duty = DutyReturn(R37Volt);V = uwFrequency_T17CH1 * 2 * 3.14 * R / (100.0 * K);if(PA1DutyLock == 0){__HAL_TIM_SET_COMPARE(&htim2, TIM_CHANNEL_2, (unsigned int)(PA1Duty * 2));}DisposeKey();if(DisplayMode == DATA){LED |= 0x01;}else{LED &= ~0x01;}if(PA1DutyLock == 1){LED |= (0x01 << 2);}else{LED &= ~(0x01 << 2);}LED_Disp(LED);LCD_Disp();}/* USER CODE END 3 */
}/*** @brief System Clock Configuration* @retval None*/
void SystemClock_Config(void)
{RCC_OscInitTypeDef RCC_OscInitStruct = {0};RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};/** Configure the main internal regulator output voltage*/HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1);/** Initializes the RCC Oscillators according to the specified parameters* in the RCC_OscInitTypeDef structure.*/RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;RCC_OscInitStruct.HSEState = RCC_HSE_ON;RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV3;RCC_OscInitStruct.PLL.PLLN = 20;RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK){Error_Handler();}/** Initializes the CPU, AHB and APB buses clocks*/RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK){Error_Handler();}
}/* USER CODE BEGIN 4 */
void DisposeKey(void)
{if(key[0].single_flag){DisplayMode++;if(DisplayMode == RECD){R = Rtemp;K = Ktemp;}else if(DisplayMode == PARA){SettingRKIndex = 0;}DisplayMode %= 3;LCD_Clear(Black);key[0].single_flag = 0;}if(key[1].single_flag){if(DisplayMode == DATA){if(PA1changingFlag == 0){PA1changingFlag = 1;PA1changingTick = 0;}}else if(DisplayMode == PARA){SettingRKIndex = !SettingRKIndex;}key[1].single_flag = 0;}if(key[2].single_flag){if(DisplayMode == PARA){if(SettingRKIndex == 0){Rtemp++;if(Rtemp == 11)Rtemp = 1;}else if(SettingRKIndex == 1){Ktemp++;if(Ktemp == 11)Ktemp = 1;}}key[2].single_flag = 0;}if(key[3].single_flag){if(DisplayMode == PARA){if(SettingRKIndex == 0){Rtemp--;if(Rtemp == 0)Rtemp = 10;}else if(SettingRKIndex == 1){Ktemp--;if(Ktemp == 0)Ktemp = 10;}}else if(DisplayMode == DATA){if(PA1DutyLock){PA1DutyLock = 0;}}key[3].single_flag = 0;}if(key[3].long_flag){if(DisplayMode == DATA){PA1DutyLock = 1;}key[3].long_flag = 0;}
}void LCD_Disp(void)
{if(DisplayMode == DATA){LCD_DisplayStringLine(Line1, "        DATA");if(PA1OutputMode == HIGHFRE){LCD_DisplayStringLine(Line3, "     M=H");}else if(PA1OutputMode == LOWFRE){LCD_DisplayStringLine(Line3, "     M=L");}sprintf(text, "     P=%02d%%", (unsigned char)(uwDuty_T17CH1 + 0.5)); //ËÄÉáÎåÈë LCD_DisplayStringLine(Line4, text);sprintf(text, "     V=%.1f    ", V);LCD_DisplayStringLine(Line5, text);}else if(DisplayMode == PARA){LCD_DisplayStringLine(Line1, "        PARA");sprintf(text, "     R=%d  ", Rtemp);LCD_DisplayStringLine(Line3, text);sprintf(text, "     K=%d  ", Ktemp);LCD_DisplayStringLine(Line4, text);}else if(DisplayMode == RECD){LCD_DisplayStringLine(Line1, "        RECD");sprintf(text, "     N=%d   ", N);LCD_DisplayStringLine(Line3, text);sprintf(text, "     MH=%.1f    ", MH);LCD_DisplayStringLine(Line4, text);sprintf(text, "     ML=%.1f    ", ML);LCD_DisplayStringLine(Line5, text);}
}float DutyReturn(float R37Volt)
{float Duty = 0;if(R37Volt < 1.0){Duty = 10.0;}else if(R37Volt >= 1.0 && R37Volt < 3.0){Duty = KA * (R37Volt - 1) + 10.0;}else if(R37Volt >= 3.0){Duty = 85.0;}return Duty;
}
/* USER CODE END 4 *//*** @brief  This function is executed in case of error occurrence.* @retval None*/
void Error_Handler(void)
{/* USER CODE BEGIN Error_Handler_Debug *//* User can add his own implementation to report the HAL error return state */__disable_irq();while (1){}/* USER CODE END Error_Handler_Debug */
}#ifdef  USE_FULL_ASSERT
/*** @brief  Reports the name of the source file and the source line number*         where the assert_param error has occurred.* @param  file: pointer to the source file name* @param  line: assert_param error line source number* @retval None*/
void assert_failed(uint8_t *file, uint32_t line)
{/* USER CODE BEGIN 6 *//* User can add his own implementation to report the file name and line number,ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) *//* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */

四、完成效果

蓝桥杯嵌入式第十四届省赛试题实现效果

五、总结

其实说本篇文章只是为了存放我的代码,所以看不懂很正常。
十四届省赛代码

这篇关于【STM32G431RBTx】备战蓝桥杯嵌入式→省赛试题→第十四届的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/895883

相关文章

2024年流动式起重机司机证模拟考试题库及流动式起重机司机理论考试试题

题库来源:安全生产模拟考试一点通公众号小程序 2024年流动式起重机司机证模拟考试题库及流动式起重机司机理论考试试题是由安全生产模拟考试一点通提供,流动式起重机司机证模拟考试题库是根据流动式起重机司机最新版教材,流动式起重机司机大纲整理而成(含2024年流动式起重机司机证模拟考试题库及流动式起重机司机理论考试试题参考答案和部分工种参考解析),掌握本资料和学校方法,考试容易。流动式起重机司机考试技

嵌入式QT开发:构建高效智能的嵌入式系统

摘要: 本文深入探讨了嵌入式 QT 相关的各个方面。从 QT 框架的基础架构和核心概念出发,详细阐述了其在嵌入式环境中的优势与特点。文中分析了嵌入式 QT 的开发环境搭建过程,包括交叉编译工具链的配置等关键步骤。进一步探讨了嵌入式 QT 的界面设计与开发,涵盖了从基本控件的使用到复杂界面布局的构建。同时也深入研究了信号与槽机制在嵌入式系统中的应用,以及嵌入式 QT 与硬件设备的交互,包括输入输出设

荣耀嵌入式面试题及参考答案

在项目中是否有使用过实时操作系统? 在我参与的项目中,有使用过实时操作系统。实时操作系统(RTOS)在对时间要求严格的应用场景中具有重要作用。我曾参与的一个工业自动化控制项目就采用了实时操作系统。在这个项目中,需要对多个传感器的数据进行实时采集和处理,并根据采集到的数据及时控制执行机构的动作。实时操作系统能够提供确定性的响应时间,确保关键任务在规定的时间内完成。 使用实时操作系统的

嵌入式Openharmony系统构建与启动详解

大家好,今天主要给大家分享一下,如何构建Openharmony子系统以及系统的启动过程分解。 第一:OpenHarmony系统构建      首先熟悉一下,构建系统是一种自动化处理工具的集合,通过将源代码文件进行一系列处理,最终生成和用户可以使用的目标文件。这里的目标文件包括静态链接库文件、动态链接库文件、可执行文件、脚本文件、配置文件等。      我们在编写hellowor

CSP 2023 提高级第一轮 CSP-S 2023初试题 完善程序第二题解析 未完

一、题目阅读 (最大值之和)给定整数序列 a0,⋯,an−1,求该序列所有非空连续子序列的最大值之和。上述参数满足 1≤n≤105 和 1≤ai≤108。 一个序列的非空连续子序列可以用两个下标 ll 和 rr(其中0≤l≤r<n0≤l≤r<n)表示,对应的序列为 al,al+1,⋯,ar​。两个非空连续子序列不同,当且仅当下标不同。 例如,当原序列为 [1,2,1,2] 时,要计算子序列 [

嵌入式方向的毕业生,找工作很迷茫

一个应届硕士生的问题: 虽然我明白想成为技术大牛需要日积月累的磨练,但我总感觉自己学习方法或者哪些方面有问题,时间一天天过去,自己也每天不停学习,但总感觉自己没有想象中那样进步,总感觉找不到一个很清晰的学习规划……眼看 9 月份就要参加秋招了,我想毕业了去大城市磨练几年,涨涨见识,拓开眼界多学点东西。但是感觉自己的实力还是很不够,内心慌得不行,总怕浪费了这人生唯一的校招机会,当然我也明白,毕业

深入探索嵌入式 Linux

摘要:本文深入探究嵌入式 Linux。首先回顾其发展历程,从早期尝试到克服诸多困难逐渐成熟。接着阐述其体系结构,涵盖硬件、内核、文件系统和应用层。开发环境方面包括交叉编译工具链、调试工具和集成开发环境。在应用领域,广泛应用于消费电子、工业控制、汽车电子和智能家居等领域。关键技术有内核裁剪与优化、设备驱动程序开发、实时性增强和电源管理等。最后展望其未来发展趋势,如与物联网融合、人工智能应用、安全性与

C语言蓝桥杯

一、语言基础 竞赛常用库函数 最值查询 min_element和max_element在vector(迭代器的使用) nth_element函数的使用 例题lanqiao OJ 497成绩分析 第一种用min_element和max_element函数的写法 第二种用min和max的写法 二分查找 二分查找只能对数组操作 binary_s

嵌入式技术的核心技术有哪些?请详细列举并解释每项技术的主要功能和应用场景。

嵌入式技术的核心技术包括处理器技术、IC技术和设计/验证技术。 1. 处理器技术    通用处理器:这类处理器适用于不同类型的应用,其主要特征是存储程序和通用的数据路径,使其能够处理各种计算任务。例如,在智能家居中,通用处理器可以用于控制和管理家庭设备,如灯光、空调和安全系统。    单用途处理器:这些处理器执行特定程序,如JPEG编解码器,专门用于视频信息的压缩或解压。在数字相机中,单用途

基于微信小程序与嵌入式系统的智能小车开发(详细流程)

一、项目概述 本项目旨在开发一款智能小车,结合微信小程序与嵌入式系统,提供实时图像处理与控制功能。用户可以通过微信小程序远程操控小车,并实时接收摄像头采集的图像。该项目解决了传统遥控小车在图像反馈和控制延迟方面的问题,提升了小车的智能化水平,适用于教育、科研和娱乐等多个领域。 二、系统架构 1. 系统架构设计 本项目的系统架构主要分为以下几个部分: 微信小程序:负责用户界面、控制指令的