Skip to content

Commit 4a1586c

Browse files
committed
implemented reader
1 parent ba94d5b commit 4a1586c

File tree

8 files changed

+1210
-3
lines changed

8 files changed

+1210
-3
lines changed

app/fopen.lock

60 Bytes
Binary file not shown.

app/index-cli.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
require '../vendor/autoload.php';
4+
5+
$arduino = new \Arduino\Wrapper();
6+
7+
$writer = new \Arduino\Writer($arduino);
8+
$writer->out('/dev/cu.usbmodem1411', 'OFF');

app/index.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
<select id="device" name="device" class="field select medium">
137137
<option value="/dev/ttyACM0">ttyACM0</option>
138138
<option value="/dev/ttyUSB0">ttyUSB0</option>
139+
<option value="/dev/cu.usbmodem1411">cu.usbmodem1411</option>
139140
</select>
140141
</div>
141142
</div>
@@ -153,4 +154,4 @@
153154
</div>
154155
</form>
155156
</body>
156-
</html>
157+
</html>

app/read.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
require '../vendor/autoload.php';
4+
5+
$arduino = new \Arduino\Wrapper();
6+
7+
$writer = new \Arduino\Reader($arduino);
8+
while (true) {
9+
print $writer->from('/dev/cu.usbmodem1411');
10+
}

0 commit comments

Comments
 (0)