Skip to content

Commit b974245

Browse files
committed
Fix README.
1 parent 47666c4 commit b974245

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# mruby-esp32-mcpwm
22

3-
PWM library for mruby-esp32.
3+
MCPWM library for mruby-esp32.
44

55
## Installation
66

@@ -16,14 +16,14 @@ Add the line below to your `build_config.rb`:
1616

1717
```ruby
1818
mcpwm = MCPWM.new(1) # GPIO pin = 1
19-
mcpwm.frequency(50) # set frequency(Hz) of PWM
20-
mcpwm.duty(10) # set duty(%) of PWM
19+
mcpwm.frequency(50) # set frequency(Hz) of MCPWM
20+
mcpwm.duty(10) # set duty(%) of MCPWM
2121
# => drive with frequency=50Hz(Period=20_000us), duby=10%(Pulse Width=2000us)
2222

2323
mcpwm = MCPWM.new(1, freq: 100, duty: 40)
2424
# => drive with frequency=100Hz(Period=10_000us), duby=40%(Pulse Width=4000us)
2525

26-
mcpwm = PWM.new(1)
26+
mcpwm = MCPWM.new(1)
2727
mcpwm.period_us(25_000)
2828
mcpwm.pulse_width_us(5_000)
2929
# => drive with frequency=40Hz(Period=25_000us), duby=20%(Pulse Width=5000us)

0 commit comments

Comments
 (0)