You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,14 @@
2
2
3
3
Cordovarduino is a Cordova/Phonegap plugin that enable you to use serial communication from an Android device to a serial over USB capable one.
4
4
5
-
It's a **work in progress** : Android to Arduino works, Arduino to Android is not yet supported
5
+
It's a **work in progress** : Android to Arduino works, Arduino to Android now works.
6
+
7
+
8
+
## Change log
9
+
10
+
2014.03: Ed. Lafargue
11
+
Implemented read(). The success callback returns a Javascript ArrayBuffer which is the best way to handle binary data
12
+
in Javascript. It is straightforward to convert this to a string if required - a utility function could be implemented in this plugin.
6
13
7
14
### Context
8
15
This work was made during an art residency hosted at the [Stereolux, Laboratoire Arts et Technologies](http://www.stereolux.org/laboratoire-arts-et-technologies) with [Coup de foudre](https://www.facebook.com/coup.defoudre.716) and [Xavier Seignard](http://drangies.fr).
@@ -37,9 +44,10 @@ serial.open(opts, function success(), function error());
37
44
You're now able to read and write:
38
45
```js
39
46
serial.write(data, function success(), function error());
40
-
serial.read(function success(), function error());
47
+
serial.read(function success(buffer), function error());
41
48
```
42
49
`data` is the string representation to be written to the serial port.
50
+
`buffer` is a JavaScript ArrayBuffer containing the data that was just read.
0 commit comments