Skip to content

ZHJ0125/STM32F051K8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STM32F051K8

Flame and Voltage detection with STM32F051K8

Also see : https://gitee.com/zhj0125/STM32F051K8

1. ADC Acquisition

for(int i=0;i<2;i++){
    HAL_ADC_Start(&hadc);
    HAL_ADC_PollForConversion(&hadc,100);
    value[i] = HAL_ADC_GetValue(&hadc);
    HAL_Delay(200);
}
HAL_ADC_Stop(&hadc);

2. Data Conversion

Battery = value[0]*3.3/4096.0;
Fire = (int)value[1];
printf("BAT = %.2lf V\t", Battery);
printf("Fire = %d\n", Fire);

3. Gallery

Overall

Overall1

font3

FlameSensor

FlameSensor

Battery

Battery

Serial Communication

Battery

About

Flame and Voltage detection with STM32F051K8

Topics

Resources

License

Stars

Watchers

Forks