Added PWM Readme.

This commit is contained in:
Yilin Sun 2023-04-13 00:54:45 +08:00
parent fda26a9894
commit 818fb9215e
Signed by: imi415
GPG Key ID: 17F01E106F9F5E0A
1 changed files with 6 additions and 0 deletions

View File

@ -27,4 +27,10 @@ ana_bg.value
led_red.toggle
usleep(100 * 1000)
end
```
```ruby
pwm_blue = Machine::PWM.new(18)
pwm_blue.duty = 65535
pwm_blue.duty # Get duty cycle
```