Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The code below gives an error 'pot' undeclared (first use in this function). How can I fix it? HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1); HAL_ADC_Start(&hadc1); pot = HAL_ADC_GetValue(&hadc1);

The code below gives an error " 'pot' undeclared (first use in this function)". How can I fix it?

HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1); HAL_ADC_Start(&hadc1); pot = HAL_ADC_GetValue(&hadc1);

if (pot >= 0 && pot < 500) { //AKTF ETTN PN } else if (pot >= 508 && pot < 1016) { //AKTF ETTN PN

}

else if (pot >= 1000 && pot < 1530) { //AKTF ETTN PN

} else if (pot >= 1530 && pot < 2040) { //AKTF ETTN PN

} else if (pot >= 2040 && pot < 2545) { //AKTF ETTN PN

} else if (pot >= 2545 && pot < 3040) { //AKTF ETTN PN

} else if (pot >= 3040 && pot < 3555) { //AKTF ETTN PN

} else if (pot >= 3555 && pot < 4095) { //AKTF ETTN PN

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Real Time Database Systems Architecture And Techniques

Authors: Kam-Yiu Lam ,Tei-Wei Kuo

1st Edition

1475784023, 978-1475784022

More Books

Students also viewed these Databases questions

Question

Diagnose situations to analyze the strength of motivation present.

Answered: 1 week ago