pwmdutycycle: Read the Status of a PWM Channel
According to pinget
, the application pwmdutycycle
queries the set duty cycle at a PWM output and displays
this value on the console.
Synopsis
Usage: ./pwmdutycycle [options] channel
Client app connecting to ‘Black-Box’ device for test purposes.
- Options:
- -h, --help
Displays help on commandline options.
- --help-all
Displays help, including generic Qt options.
- -v, --version
Displays version information.
- -a, --address <host>
Host address of the gateway [localhost].
- -p, --port <port>
Port of the gateway [51955].
- -f, --frequency <period>
Frequency (period) of sending in ms [1000]
- --debug
Report additional debug info in log.
- -s, --severity <level>
Max severity (fatal|error|warning|info|debug|verbose) of log message.
- Arguments:
channel identifier of the pwm channel.
Examples
The example ./pwmdutycycle -a blackbox1 -f 100 -s info 0
queries the current duty cycle (10 bits) of channel 0
with a period of 100 milliseconds. An example output is
2024-05-10 12:18:54.154 NONE Press Ctrl-C to abort application.
2024-05-10 12:18:54.154 INFO Try polling pwm channel 0 every 100 ms
2024-05-10 12:18:54.163 INFO Client is connected...
2024-05-10 12:18:54.168 INFO Session identifier 21, protocol version 0
2024-05-10 12:18:54.175 INFO Value changed: 92
2024-05-10 12:18:54.276 INFO Value changed: 236
2024-05-10 12:18:54.477 INFO Value changed: 77
2024-05-10 12:18:54.775 INFO Value changed: 154
2024-05-10 12:18:55.012 INFO Value changed: 251
2024-05-10 12:18:55.275 INFO Value changed: 139
2024-05-10 12:18:55.476 INFO Value changed: 72
2024-05-10 12:18:55.776 INFO Value changed: 36
2024-05-10 12:18:56.066 INFO Value changed: 0
2024-05-10 12:18:56.275 INFO Value changed: 36
2024-05-10 12:18:56.476 INFO Value changed: 72
2024-05-10 12:18:56.776 INFO Value changed: 139
2024-05-10 12:18:56.979 INFO Value changed: 251
2024-05-10 12:18:57.286 INFO Value changed: 154
2024-05-10 12:18:57.494 INFO Value changed: 77
2024-05-10 12:18:57.696 INFO Value changed: 236