I use gpio #32 (wPi #26) as PWM output to control the speed of a fan based on temperature. The job starts at system startup with a dedicated account.
I would like to display the current value that is set with gpio command on a dashboard using a different account (eg when gpio pwm 26 50
is issued then I am interested in the 50
), but I cannot not find any way to read the current PWM configuration and values. For example, $ gpio readall
does not tell me the duty cycle et cetera, just tells me the below snapshot that is meaningless in my use case.
+-----+-----+---------+------+---+-Pi ZeroW-+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| 32 | 1 | ALT0 | GPIO.26 | 26 | 12 |
How can I read the current PWM output values of wPi #26 from the cli?