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 2505199

Browse files
Merge pull request #2 from mrprompt/master
Fix text
2 parents b1e4bf1 + 3424e53 commit 2505199

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
@@ -17,7 +17,7 @@ composer require marabesi/arduino-php-wrapper
1717

1818
## Usage
1919

20-
to write date on Arduino serial just use the regular I/O functions in PHP such as **fwrite** or **file_put_contents**
20+
To read data from Arduino serial just use the regular I/O functions in PHP such as **fread** or **file_get_contents**
2121

2222
``` php
2323
\Arduino\Wrapper::register();
@@ -28,6 +28,7 @@ print fread($resource, 1024);
2828
```
2929

3030
Or if you prefer, you can use **file_get_contents** and get the same result
31+
3132
``` php
3233
print file_get_contents('arduino://ttyUSB0');
3334
```
@@ -58,6 +59,7 @@ You can use in your project in a OOP style
5859
$writer = new Arduino\Writer(new Arduino\Wrapper());
5960
$bytes = $writer->out('ttyUSB0', 'from oop');
6061
```
62+
6163
### Reading data
6264

6365
``` php

0 commit comments

Comments
(0)

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