PWM

Recurrent H/W and software problems
Post Reply
User avatar
Oli
Posts: 47
Joined: Tue Feb 09, 2021 10:07 am
Location: Germany, Meissen
Has thanked: 13 times
Been thanked: 45 times
Contact:

PWM

Post by Oli »

I need help: PWM

What do I do wrong, I only get syntax error. Annex WiFi 1.48

PWM.SETUP 5, 1, 2048, 5000, 12
pwm.out 1,20

Code: [Local Link Removed for Guests]

PIN.MODE 13, OUTPUT    'LED
PIN.MODE 04, OUTPUT    'LED
PIN.MODE 05, OUTPUT    'LED
PIN.MODE 14, OUTPUT    'LED
PIN.MODE 12, OUTPUT    'LED

PWM.SETUP 5, 1, 2048, 5000, 12

'PIN.TONE 13, 6 ,2000
pwm.out 1,20

end
You do not have the required permissions to view the files attached to this post.
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: PWM

Post by cicciocb »

The pwm in the esp8266 works differently from the esp32

Look in the documentation
image.png
You do not have the required permissions to view the files attached to this post.
comptebidouille
Posts: 13
Joined: Sun Nov 19, 2023 10:52 am

Re: PWM

Post by comptebidouille »

Hello !
I am sorry but when i see in the 1.43 version of help, i can't see what's in the screenshot...there must be a mistake or i am not looking where i should :oops:

Ps: i am using v1.48 on esp8266 for a pwm project and i also have some problems with pwm.setup and pwm.out
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: PWM

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sun Mar 17, 2024 8:57 am Hello !
I am sorry but when i see in the 1.43 version of help, i can't see what's in the screenshot...there must be a mistake or i am not looking where i should :oops:

Ps: i am using v1.48 on esp8266 for a pwm project and i also have some problems with pwm.setup and pwm.out
The help is different between the esp8266 and the esp32.
If you type F2 when you are inside the editor window, the help will appear automatically.

For the esp8266 is very simple :

just use
PWM(pin) = value
image.png
You do not have the required permissions to view the files attached to this post.
comptebidouille
Posts: 13
Joined: Sun Nov 19, 2023 10:52 am

Re: PWM

Post by comptebidouille »

I got it ! 8-)
Post Reply