adc.h

来自「butterflylogger_src_20060822 for atmel a」· C头文件 代码 · 共 38 行

H
38
字号
////Atmel AVR Design Contest 2006 Registration Number AT3221//#define TEMPERATURE_SENSOR  0#define VOLTAGE_SENSOR      1#define LIGHT_SENSOR        2#define CELCIUS             3#define FARENHEIT           4#define DIR_SENSOR      	4// this is effeted by the light and temp a little// 1.07 is a compromise so analog reading can vary by +/- 50mV// this is okay as we are only using it to moonitor the battery voltage#define VREF		1.07f									void ADC_init(char );int ADC_read(void);void ADC_periphery(void);void ADC2Temp(char log, int ADCResult);void ADC2Volt(char log, int ADCResult);void ADC2RAW(char log, unsigned int ADCResult);void ADC2Direction(char log, int ADCresult,char sensor);// Temperature sensor functionchar TemperatureFunc(char);// Voltage reader functionchar VoltageFunc(char);// Light sensor functionchar LightFunc(char);//Direction reader functionchar DirectionFunc(char);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?