Retrieve the PWN value

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mackowiakp
Normal user
Posts: 531
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Retrieve the PWN value

#1 Post by mackowiakp » 03 Nov 2023, 00:48

I have a sensor with PWM output.
At the moment I am using a ready-made module on an operational amplifier and reading the measured value using ADC.
But are there any modules that would allow reading the pulse width in digital form?

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

Re: Retrieve the PWN value

#2 Post by TD-er » 03 Nov 2023, 08:16

You mean like [Plugin#GPIO#Pinstate#N] (with N being the GPIO nr) but then for the PWM value as a state?

I just looked at the code and it doesn't work like that, but I guess we could add it as a feature.
Not sure whether it should be called "pinstate" or "pwmstate".

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

Re: Retrieve the PWN value

#3 Post by Ath » 03 Nov 2023, 08:32

It's supposed to return the PWM value for pins set to PWM output... :?

Edit: See the docs
/Ton (PayPal.me)

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

Re: Retrieve the PWN value

#4 Post by TD-er » 03 Nov 2023, 09:15

It might work... but processing the function also tries to read the pin state and not sure what this will do to the PWM which is running.

Post Reply

Who is online

Users browsing this forum: No registered users and 43 guests