• 大小: 1.77MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-06
  • 语言: 其他
  • 标签: stm32  

资源简介

基于stm32的颜色传感器程序,已经集成为一个c文件,调用时只需要两个函数即可。

资源截图

代码片段和文件信息

//库函数寄存器混杂版--库版本为3.5
//需要_rcc.c _gpio.c _exti.c _misc.c
#include 
#include “misc.h“
#include 
#include “color_all_in_one.h“


//一堆无聊的函数名部分,看官可略过
void Stm32_Clock_Init(u8 PLL);
void MYRCC_DeInit(void);
void MY_NVIC_SetVectorTable(u32 NVIC_VectTab u32 Offset);
void delay_init(u8 SYSCLK);
void delay_ms(u16 nms);
void delay_us(u32 nus);
void delay_init(u8 SYSCLK);
void tcs3200_init(u8 s0u8 s1);
void whitebalance(void);
u16 tcs3200_RED(void);
u16 tcs3200_GREEN(void);
u16 tcs3200_BLUE(void);
void EXTI4_IRQHandler(void);
void EXTIX_Init(void);

//变量定义部分
u16 i;
u16 R =0x0000G =0x0000B =0x0000;

static u8  fac_us=0;//us延时倍乘数
static u16 fac_ms=0;//ms延时倍乘数

double RgenaGgenaBgena;
double RamountGamountBamount;
double amount;
int j;
/***

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        8021  2015-07-27 15:03  color_all_in_one\color_all_in_one.c
     文件         871  2015-07-26 15:57  color_all_in_one\color_all_in_one.h
     目录           0  2015-07-30 07:58  color_all_in_one\Libraries\
     目录           0  2015-07-30 07:58  color_all_in_one\Libraries\CMSIS\
     目录           0  2015-07-30 07:58  color_all_in_one\Libraries\CMSIS\CM3\
     目录           0  2015-07-30 07:58  color_all_in_one\Libraries\CMSIS\CM3\CoreSupport\
     文件       17273  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\CoreSupport\core_cm3.c
     文件       85714  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h
     目录           0  2015-07-30 07:58  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\
     目录           0  2015-07-30 07:58  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\
     文件       19836  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\Release_Notes_for_STM32F10x_CMSIS.html
     目录           0  2015-07-30 07:58  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\
     目录           0  2015-07-30 07:58  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\
     目录           0  2015-07-30 07:58  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\
     文件       15761  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s
     文件       15498  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s
     文件       12371  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld.s
     文件       13651  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld_vl.s
     文件       12760  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md.s
     文件       14068  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md_vl.s
     文件       15950  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_xl.s
     目录           0  2015-07-30 07:58  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\
     文件       12943  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_cl.s
     文件       13042  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_hd.s
     文件        9698  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_ld.s
     文件       10445  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_ld_vl.s
     文件       10154  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_md.s
     文件       10941  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_md_vl.s
     文件       13143  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_xl.s
     目录           0  2015-07-30 07:58  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\
     文件       16629  2010-04-23 10:40  color_all_in_one\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_cl.s
............此处省略144个文件信息

评论

共有 条评论