Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7b9b055

Browse files
Update README.md
added info
1 parent db8b79b commit 7b9b055

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

‎README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ print fread($resource, 1024);
1717

1818
Or if you prefer, you can use **file_get_contents** and get the same result
1919
``` php
20-
print file_get_contents('arduinno://ttyUSB0');
20+
print file_get_contents('arduino://ttyUSB0');
2121
```
2222

2323
To write data in the Arduino serial is as easy as it could be
@@ -36,6 +36,15 @@ print fwrite('hello Arduino');
3636
print file_put_contents('arduino://hello Arduino');
3737
```
3838

39+
## OOP
40+
41+
You can use in your project in a OOP style
42+
43+
``` php
44+
$writer = new Arduino\Writer(new Arduino\Wrapper());
45+
$bytes = $writer->out('ttyUSB0', 'from oop');
46+
```
47+
3948
## Improvements
4049

4150
As you can see is really simple and we can improve it much more as the sensors are identified

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /