Skip to content

Commit 7f2affd

Browse files
Fix small mistake.
1 parent 1ec798a commit 7f2affd

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

mruby_io_GPIO_en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ GPIO.setmode( "B1", GPIO::IN|GPIO::PULL_UP )
3434
Example of use:
3535

3636
```ruby
37-
GPIO.new( 1, GPIO::IN )
37+
GPIO.setmode( 1, GPIO::IN )
3838
v1 = GPIO.read_at( 1 ) # read from pin 1.
3939
```
4040

@@ -73,8 +73,8 @@ if GPIO.low_at?( 1 )
7373
Example of use:
7474

7575
```ruby
76-
GPIO.new( 1, GPIO::OUT )
77-
v1 = GPIO.write_at( 1, 0 ) # output zero to pin 1.
76+
GPIO.setmode( 1, GPIO::OUT )
77+
GPIO.write_at( 1, 0 ) # output zero to pin 1.
7878
```
7979

8080
---

mruby_io_GPIO_ja.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ GPIO.setmode( "B1", GPIO::IN|GPIO::PULL_UP )
3434
使用例
3535

3636
```
37-
GPIO.new( 1, GPIO::IN )
37+
GPIO.setmode( 1, GPIO::IN )
3838
v1 = GPIO.read_at( 1 ) # read from pin 1.
3939
```
4040

@@ -73,8 +73,8 @@ if GPIO.low_at?( 1 )
7373
使用例
7474

7575
```
76-
GPIO.new( 1, GPIO::OUT )
77-
v1 = GPIO.write_at( 1, 0 ) # output zero to pin 1.
76+
GPIO.setmode( 1, GPIO::OUT )
77+
GPIO.write_at( 1, 0 ) # output zero to pin 1.
7878
```
7979

8080
---

0 commit comments

Comments
 (0)