Skip to content

Commit d3fbd3f

Browse files
committed
update with multiple arduinos with arrays example
1 parent a01bb8d commit d3fbd3f

File tree

5 files changed

+90144
-0
lines changed

5 files changed

+90144
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Examples
4545
* Read and Animate Example: [p5 web editor](https://editor.p5js.org/p5-serial/sketches/rfrtcdrJd) | [github repo](https://github.com/p5-serial/p5.serialport/tree/master/examples/readAndAnimate)
4646
* Read Count Example: [p5 web editor](https://editor.p5js.org/p5-serial/sketches/g7xhJIO27) | [github repo](https://github.com/p5-serial/p5.serialport/tree/master/examples/readCount)
4747
* Two Arduinos Example: [p5 web editor](https://editor.p5js.org/p5-serial/sketches/yWTivVhtG) | [github repo](https://github.com/p5-serial/p5.serialport/tree/master/examples/twoArduinos)
48+
* Two Arduinos Array Example: [p5 web editor](https://editor.p5js.org/p5-serial/sketches/Yod6LK05J) | [github repo]()
4849
* Write Example: [p5 web editor](https://editor.p5js.org/p5-serial/sketches/RH9J9z5YG) | [github repo](https://github.com/p5-serial/p5.serialport/tree/master/examples/writeExample)
4950

5051
### Basic Example

examples/twoArduinos/sketch.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
Example of using multiple serial ports in one sketch.
3+
4+
By Jiwon Shin
5+
*/
16
// Declare a "SerialPort" object
27
let serialOne, serialTwo;
38
let latestDataOne = "waiting for data";

examples/twoArduinosArray/index.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<html>
2+
<head>
3+
<meta charset="UTF-8">
4+
<script language="javascript" type="text/javascript" src="p5.js"></script>
5+
<script language="javascript" type="text/javascript" src="../../lib/p5.serialport.js"></script>
6+
<script language="javascript" type="text/javascript" src="sketch.js"></script>
7+
<style> body {padding: 0; margin: 0;} </style>
8+
</head>
9+
<body>
10+
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)