Skip to content

Commit dd96280

Browse files
author
Bram Ceulemans
authored
Update README.md
1 parent 246a68d commit dd96280

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,27 @@ Example
2323

2424
```php
2525
<?php
26-
include 'PhpSerial.php';
26+
include 'SerialConnection.php';
2727

2828
// Let's start the class
29-
$serial = new PhpSerial();
29+
$serial = new SerialConnection();
3030

3131
// First we must specify the device. This works on both linux and windows (if
3232
// your linux serial device is /dev/ttyS0 for COM1, etc)
33-
$serial->deviceSet("COM1");
33+
$serial->setDevice("COM1");
3434

3535
// We can change the baud rate, parity, length, stop bits, flow control
36-
$serial->confBaudRate(2400);
37-
$serial->confParity("none");
38-
$serial->confCharacterLength(8);
39-
$serial->confStopBits(1);
40-
$serial->confFlowControl("none");
36+
$serial->setBaudRate(2400);
37+
$serial->setParity("none");
38+
$serial->setCharacterLength(8);
39+
$serial->setStopBits(1);
40+
$serial->setFlowControl("none");
4141

4242
// Then we need to open it
43-
$serial->deviceOpen();
43+
$serial->open();
4444

4545
// To write into
46-
$serial->sendMessage("Hello !");
46+
$serial->sendMessage("Hello, World!");
4747
```
4848

4949
State of the project

0 commit comments

Comments
 (0)