File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ print fread($resource, 1024);
1717
1818Or 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
2323To write data in the Arduino serial is as easy as it could be
@@ -36,6 +36,15 @@ print fwrite('hello Arduino');
3636print 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
4150As you can see is really simple and we can improve it much more as the sensors are identified
You can’t perform that action at this time.
0 commit comments