read the duty cycle value?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
chromo23
Normal user
Posts: 821
Joined: 10 Sep 2020, 16:02
Location: germany

read the duty cycle value?

#1 Post by chromo23 » 06 Dec 2022, 08:53

Good morning,

the duty cycle value used in the pwm command must be stored somewhere.
Is there a command to retrieve it?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: read the duty cycle value?

#2 Post by TD-er » 06 Dec 2022, 10:01

Doesn't it show at the pin state buffer page?
Not sure if that page is also/already available as JSON.

User avatar
chromo23
Normal user
Posts: 821
Joined: 10 Sep 2020, 16:02
Location: germany

Re: read the duty cycle value?

#3 Post by chromo23 » 06 Dec 2022, 10:13

Thanks!
And is retrieving the value from there for further processing (sending it somewhere / rules) possible somehow?

Edit:
Not sure if that page is also/already available as JSON.
it isn’t ...

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: read the duty cycle value?

#4 Post by TD-er » 06 Dec 2022, 10:16

Not right now.
But I guess it would make sense to make it available, like the pinstate is.
For example:

Code: Select all

[Plugin#GPIO#Pinstate#13]
See: https://espeasy.readthedocs.io/en/lates ... ing-events
Then scroll up a bit...

judie07
New user
Posts: 5
Joined: 26 Dec 2022, 12:58

Re: read the duty cycle value?

#5 Post by judie07 » 26 Dec 2022, 17:02

Have you made any progress? ->viewtopic.php?p=61989#p61989

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: read the duty cycle value?

#6 Post by Ath » 26 Dec 2022, 23:28

I have created Pull request #4435 to enable the last set duty-cycle value to be retrieved for (internal) GPIO pins set to PWM or SERVO.
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests