Hi all, i'm currently working with STM32F303K8 microcontroller with Arduino IDE and i just want to read the analog input from potentiometer and write that analog value to PWM output (simply control the speed of the motor by potentiometer) while monitoring the potentiometer value through serial monitor.
I have try to achieve this using analogRead(), analogWrite() functions as we used in the Arduino programming. but it wouldn't work simultaneously.
that's mean analogread() function is working with serial monitor but when i try to analogWrite() that analog value as a PWM nothing will work and serial monitor also not showing anything. Also i have tried combining the "All-in-one_setPWM" and "ADC/Internal_channel" which comes with STM32Duino examples but it also working as it is.
Could you please help me to achieve this task by combining the above mentioned two example code.
2 posts - 2 participants