Skip to content

Commit 00f672c

Browse files
authored
Update README.md
1 parent 24ae254 commit 00f672c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ $board = \Calcinai\PHPi\Factory::create();
4646
Minimal example of reading and setting a pin
4747

4848
```php
49+
use Calcinai\PHPi\Pin\PinFunction;
50+
use Calcinai\PHPi\Pin;
4951

5052
$pin = $board->getPin(17) //BCM pin number
5153
->setFunction(PinFunction::INPUT)
5254
->setPull(Pin::PULL_UP);
5355

5456
//Will be === to Pin::LEVEL_HIGH or Pin::LEVEL_LOW
55-
var_dump($pin->level());
57+
var_dump($pin->getLevel());
5658

5759
$pin->setFunction(PinFunction::OUTPUT);
5860
$pin->high();

0 commit comments

Comments
 (0)