
I'm working with the example https://github.com/stm32duino/STM32Exam ... ration.ino and it works quite well on my BluePill board!
question: Is it possible to update frequency and DutyCycle in the loop Function? because of the following line in the setup functions, i thought, tat it should be.
Code: Select all
// Instantiate HardwareTimer object. Thanks to 'new' instantiation, HardwareTimer is not destructed when setup() function is finished.
HardwareTimer *MyTim = new HardwareTimer(Instance);
Code: Select all
MyTim->setPWM(channel, pin, 1000, 50);
Code: Select all
error: 'MyTim' was not declared in this scope
50 | MyTim->setPWM(channel, pin, 150000, 50);
| ^~~~~
exit status 1
'MyTim' was not declared in this scope
Does somebody know what am I doing or understanding wrong?
greetings, Jens