We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b1e4bf1 + 3424e53 commit 2505199Copy full SHA for 2505199
README.md
@@ -17,7 +17,7 @@ composer require marabesi/arduino-php-wrapper
17
18
## Usage
19
20
-to write date on Arduino serial just use the regular I/O functions in PHP such as **fwrite** or **file_put_contents**
+To read data from Arduino serial just use the regular I/O functions in PHP such as **fread** or **file_get_contents**
21
22
``` php
23
\Arduino\Wrapper::register();
@@ -28,6 +28,7 @@ print fread($resource, 1024);
28
```
29
30
Or if you prefer, you can use **file_get_contents** and get the same result
31
+
32
33
print file_get_contents('arduino://ttyUSB0');
34
@@ -58,6 +59,7 @@ You can use in your project in a OOP style
58
59
$writer = new Arduino\Writer(new Arduino\Wrapper());
60
$bytes = $writer->out('ttyUSB0', 'from oop');
61
62
63
### Reading data
64
65
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments