资源简介
本设计主要有三个模块,包括信号检测模块、主控模块、电机驱动模块。信号检测模块采用灰度传感器和超声波,用以对有无障碍与跟随黑线进行检测。主控电路采用STM32单片机为控制芯片。电机驱动模块采用意法半导体的298N专用电机驱动芯片,单片控制与传统分立元件电路相比,使整个系统有很好的稳定性。信号检测模块将采集到的路况信号传入STM32单片机,经单片机处理过后对298N发出指令进行相应的调整。通过有无光线接收来控制电动小车的转向,从而实现自动循迹避障的功能。
代码片段和文件信息
/**
******************************************************************************
* @file stm32f1xx_hal.c
* @author MCD Application Team
* @brief HAL module driver.
* This is the common part of the HAL initialization
*
@verbatim
==============================================================================
##### How to use this driver #####
==============================================================================
[..]
The common HAL driver contains a set of generic and common APIs that can be
used by the PPP peripheral drivers and the user to start using the HAL.
[..]
The HAL contains two APIs‘ categories:
(+) Common HAL APIs
(+) Services HAL APIs
@endverbatim
******************************************************************************
* @attention
*
* © Copyright (c) 2016 STMicroelectronics.
* All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license
* the “License“; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include “stm32f1xx_hal.h“
/** @addtogroup STM32F1xx_HAL_Driver
* @{
*/
/** @defgroup HAL HAL
* @brief HAL module driver.
* @{
*/
#ifdef HAL_MODULE_ENABLED
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/** @defgroup HAL_Private_Constants HAL Private Constants
* @{
*/
/**
* @brief STM32F1xx HAL Driver version number V1.1.4
*/
#define __STM32F1xx_HAL_VERSION_MAIN (0x01U) /*!< [31:24] main version */
#define __STM32F1xx_HAL_VERSION_SUB1 (0x01U) /*!< [23:16] sub1 version */
#define __STM32F1xx_HAL_VERSION_SUB2 (0x04U) /*!< [15:8] sub2 version */
#define __STM32F1xx_HAL_VERSION_RC (0x00U) /*!< [7:0] release candidate */
#define __STM32F1xx_HAL_VERSION ((__STM32F1xx_HAL_VERSION_MAIN << 24)\
|(__STM32F1xx_HAL_VERSION_SUB1 << 16)\
|(__STM32F1xx_HAL_VERSION_SUB2 << 8 )\
|(__STM32F1xx_HAL_VERSION_RC))
#define IDCODE_DEVID_MASK 0x00000FFFU
/**
* @}
*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/** @defgroup HAL_Private_Variables HAL Private Variables
* @{
*/
__IO uint32_t uwTick;
uint32_t uwTickPrio = (1UL << __NVIC_PRIO_BITS); /* Invalid PRIO */
HAL_TickFreqTypeDef uwTickFreq = HAL_TI
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6759 2019-11-25 20:03 csb2_f1\.mxproject
文件 6756 2019-11-25 20:03 csb2_f1\csb2_f1.ioc
文件 974113 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Device\ST\STM32F1xx\Include\stm32f103xe.h
文件 7481 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Device\ST\STM32F1xx\Include\stm32f1xx.h
文件 2029 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Device\ST\STM32F1xx\Include\system_stm32f1xx.h
文件 28208 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\cmsis_armcc.h
文件 56497 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\cmsis_armclang.h
文件 9014 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\cmsis_compiler.h
文件 62344 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\cmsis_gcc.h
文件 28414 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\cmsis_iccarm.h
文件 1716 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\cmsis_version.h
文件 97995 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\core_armv8mbl.h
文件 168914 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\core_armv8mml.h
文件 42208 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\core_cm0.h
文件 50464 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\core_cm0plus.h
文件 43456 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\core_cm1.h
文件 104628 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\core_cm23.h
文件 111854 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\core_cm3.h
文件 175600 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\core_cm33.h
文件 123607 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\core_cm4.h
文件 148588 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\core_cm7.h
文件 47249 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\core_sc000.h
文件 110523 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\core_sc300.h
文件 11711 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\mpu_armv7.h
文件 10958 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\mpu_armv8.h
文件 2757 2019-10-04 18:53 csb2_f1\Drivers\CMSIS\Include\tz_context.h
文件 204810 2019-10-04 18:53 csb2_f1\Drivers\STM32F1xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h
文件 11594 2019-10-04 18:53 csb2_f1\Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal.h
文件 53734 2019-10-04 18:53 csb2_f1\Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_adc.h
文件 47781 2019-10-04 18:53 csb2_f1\Drivers\STM32F1xx_HAL_Driver\Inc\stm32f1xx_hal_adc_ex.h
............此处省略163个文件信息
- 上一篇:个人静态网页的实现
- 下一篇:TFT LCD 3.5寸驱动程序例程 STM32
相关资源
- TFT LCD 3.5寸驱动程序例程 STM32
- 基于STM32的电子琴设计
- 基于stm32f407芯片双ADC多通道开启AD转换
- STM32单片机程序+原理图.rar
- STM32蓝牙+超声波+舵机.rar
- STM32F103C8 例程
- 基于STM32和arduino的MPU9250九轴传感器代
- stm32f103c8t6蓝牙运动控制.zip
- STM32+lcd12864串行方式显示贪吃蛇代码
- STM32综合测试程序4.0寸ILI9486_320X480_8位
- FDC2214测试代码
- TCRT5000红外反射传感器循迹传感器.z
- stm32F103 +nrf24l01 发送程序
- CMT2300A_+_STM32F103RBT6编译通过,未实物
- stm32F103RVT6与vs1003/1053/SD卡做成的MP3
- 串口-Lin通信主、从工程代码.zip
- 基于STM32F103的无感和有感无刷直流电
- 基于stm32的万年历,有液晶显示、阴阳
- 超声波测距stm32
- STM32F103C8T6核心板资料及测试代码.zi
- 2017年电子设计竞赛K题源代码单相用电
- STM32CUEB关于KEIL5、stm32f103c8t6时钟配置
- uCOS-III内核实现与应用开发实战指南—
- STM32L051C8T6_USART1.zip
- STM32F103ZET6_INA226电流采集芯片源码.z
- AD9910驱动+PDF调幅频,ram模式,drg模式
- STM32 LCD12864 -Z小旋.zip
- 基于STM32的步进电机加减速程序
- 泰庆电子0.96OLED显示屏_STM32ZET系列_S
- stm32 内部ADC的使用
评论
共有 条评论