PWM error in compiling sketch

I am trying to compile a sketch and everytime it stops with the error PWM was not declared in this scope. The code line is; " pinMode(PB6, PWM); " any suggestions to correct this. I am trying to upload to a STM32.

It usually helps if you post it here

pinMode(PB6, PWM); 

What exactly are you trying to do with this line of code ?
The only valid options for pinMode() are INPUT, INPUT_PULLUP and OUTPUT

I am new to Arduino so I am trying different sketches that I have downloaded in order to compile and upload to a STM32. So I see by your answer the code is incorrect. I have been also trying to upload the controller code by Joop Brokking for the STM32 and have not been able to get beyond trying to compile it without it halting with numerous errors for missing libraries and directories, which I know are there. Like this one:

Please don't post pictures of code and errors

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

I do apologize for my error.

Hi, @bptrav11
Welcome to the forum.

Can you please tell us your electronics, programming, arduino, hardware experience?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

I am completely new to Arduino but have a few years of PLC programming experience and filling equipment electronic background. Most of my experience has been with Tetra Pak filling systems over the last 35 years. I am new to micro controller programming.

Hi,
Thanks for the info.
We need to see your complete code, posted as per the instructions in post #4.

Tom.... :smiley: :+1: :coffee: :australia:

@bptrav11 This looks like the same problem that you posted in https://forum.arduino.cc/t/ymf-32-quad-flight-controller/926966

Were you not happy with the answers there ?

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.