electromagnetic(ELE)

method

ele_Init(void)

Electromagnetic sensor sampling initialization

Return valuetype
nonevoid

Get_Adc_ele(u8 ch)

AD sampling

parametertypeAnnotation
chu8ADC channel
Return valuetype
AD conversion resultu16

getEleData(void)

Get sensor data

Return valuetype
void

guiyi_way(void)

The obtained data is based on one algorithm

Return valuetype
Currently in the position of the magnetic fieldint

deal_getdata(int a)

Processed the obtained data

parametertypeAnnotation
aintThe value to be processed
Return valuetype
Treatment valueint

EleDataDeal(void)

Data display on the screen

Return valuetype
noneonevoid
Macro definitionvalueAnnotation
ELE_L1_ClkRCC_APB2Periph_GPIOCThe clock of the left sensor 1 of the left sensor 1
ELE_L1_PinGPIO_Pin_0GPIO pin of the left sensor 1
ELE_L1_PortGPIOCGPIO port on the left sensor 1
ELE_L2_ClkRCC_APB2Periph_GPIOCThe clock of the left sensor 2
ELE_L2_PinGPIO_Pin_1GPIO pin on the left sensor 2
ELE_L2_PortGPIOCGPIO port on the left sensor 2
ELE_L3_ClkRCC_APB2Periph_GPIOCThe clock of the sensor 3 on the left
ELE_L3_PinGPIO_Pin_2GPIO pin on the left sensor 3
ELE_L3_PortGPIOCGPIO port on the left sensor 3
ELE_MID_ClkRCC_APB2Periph_GPIOCThe clock of the middle sensor
ELE_MID_PinGPIO_Pin_3GPIO pin of the middle sensor
ELE_MID_PortGPIOCGPIO port of the middle sensor
ELE_R1_ClkRCC_APB2Periph_GPIOCThe clock of the right sensor 1
ELE_R1_PinGPIO_Pin_4GPIO pin of the right sensor 1
ELE_R1_PortGPIOCGPIO port of the right sensor 1
ELE_R2_ClkRCC_APB2Periph_GPIOCThe clock of the right sensor 2
ELE_R2_PinGPIO_Pin_5GPIO pin of the right sensor 2
ELE_R2_PortGPIOCGPIO port on the right sensor 2
ELE_R3_ClkRCC_APB2Periph_GPIOBThe clock of the right sensor 3
ELE_R3_PinGPIO_Pin_0GPIO pin of the right sensor 3
ELE_R3_PortGPIOBGPIO port on the right sensor 3
ELE_ADCADC2ADC used
ELE_ADC_CLKRCC_APB2Periph_ADC2ADC clock
ELE_L1_CHADC_Channel_10ADC channel on the left sensor 1
ELE_L2_CHADC_Channel_11ADC channel on the left sensor 2
ELE_L3_CHADC_Channel_12ADC channel on the left sensor 3
ELE_M1_CHADC_Channel_13ADC channel of the middle sensor
ELE_R1_CHADC_Channel_14ADC channel of the right sensor 1
ELE_R2_CHADC_Channel_15ADC channel of the right sensor 2
ELE_R3_CHADC_Channel_8ADC channel of the right sensor 3
Global variabletypeAnnotation
ele_seatintThe variables after algorithm processing
Sensor_Left_1intThe value of the sensor 1 on the left
Sensor_Left_2intThe value of the sensor 2 on the left
Sensor_Left_3intThe value of the sensor 3 on the left
Sensor_Right_1intThe value of the right sensor 1
Sensor_Right_2intThe value of the right sensor 2
Sensor_Right_3intThe value of the right sensor 3
Sensor_MiddleintThe value of the middle sensor