Skip to content
Snippets Groups Projects
Unverified Commit b3b5f16b authored by Brendan DeLeon's avatar Brendan DeLeon Committed by GitHub
Browse files

Update index.js

parent c1f6b204
No related branches found
No related tags found
1 merge request!1Update index.js
...@@ -17,7 +17,17 @@ function client(dir){ ...@@ -17,7 +17,17 @@ function client(dir){
// get the data from the server // get the data from the server
client.on('data', (data) => { client.on('data', (data) => {
const dataArr = data.toString().split(",");
let t = dataArr[0];
let v = dataArr[1];
let u = dataArr[2];
console.log(t.toString());
console.log(v.toString());
console.log(u.toString());
document.getElementById("bluetooth").innerHTML = data; document.getElementById("bluetooth").innerHTML = data;
document.getElementById("temperature").innerHTML = t;
document.getElementById("voltage").innerHTML = v;
document.getElementById("ultrasonic").innerHTML = u;
console.log(data.toString()); console.log(data.toString());
client.end(); client.end();
client.destroy(); client.destroy();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment