Sign in

裴昌跃 / AGVkunshantaiguang · Files

Logo

GitLab

  • Back to dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • AGVkunshantaiguang
  • 开山AGV程序
  • APP
  • adc_task.c
  • 初次提交
    995bc54d
    裴昌跃 authored
    2023-09-01 14:14:59 +0800  
    Browse Code »
adc_task.c 392 Bytes
Edit Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

#include "hardware.h"
#include "delay.h"
#include "sys.h"




#define ADCen 0u
void adc_task(void *pdata)//模拟量口采集信息
{ 
	#if ADCen
	while(1)
	{	
		
		Voltage1=((float)Get_Adc_Average(ADC_Channel_4,2))/4096*3.3f*3.2f;          //获取实际电压值1
//		Voltage2=((float)Get_Adc_Average(ADC_Channel_5,20))/4096*3.3f*3.2f;       //获取实际电压值2    

		OSTimeDly(10);

	}
	#endif
	
}