-
Notifications
You must be signed in to change notification settings - Fork 6
/
example.html
49 lines (47 loc) · 1.68 KB
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<html>
<head>
<script src="ArduinoEthernetCom.js"></script>
<script>
window.onload = function() {
var aec = new ArduinoEthernetCom( {frequency: 2} );
aec.addObserver(function(data) {
var a0 = data.A0,
a5 = data.A5;
document.getElementById('a0val').innerHTML = a0;
document.getElementById('a5val').innerHTML = a5;
});
document.getElementById('runButton').onclick = function() {
aec.start();
}
}
</script>
<head>
<body style="text-align: left; font-size: 1.1em">
<div>
To start streaming data from your Arduino over a Ethernet cable, simply
<ol>
<li>
Upload the tiny <a href="Arduino/JSONPSensorServer.ino">server sketch</a> to your Arduino
</li>
<li>
Plug in your ethernet shield, connect the Arduino to your computer with an ethernet cable and wait about 30 seconds for
the Arduino server to boot up
</li>
<li>
Click the "Start Reading" button below
</li>
</ol>
</div>
<div>
<button id="runButton">Start Reading</button>
</div>
<div style="padding: 15px;">
Pin A0's value: <span id="a0val">—</span><br/>
Pin A5's value: <span id="a5val">—</span>
</div>
<div>
See the GitHub repository at <a href="https://github.com/sfentress/ArduinoEthernetCom">https://github.com/sfentress/ArduinoEthernetCom</a>.<br/>
To read more about streaming data to your computer over an Ethernet cable, read <a href="http://blog.concord.org/streaming-arduino-data-to-a-browser">this blog post</a>.
</div>
</body>
</html>