error error in protocorder

9 views
Skip to first unread message

anderso...@gmail.com

unread,
Sep 24, 2018, 7:43:28 AM9/24/18
to Protocoder
I was making an Android phone robot the help of an instructable website

//make a new file on protocder and past this code into there

var arduino = boards.startArduino(9600, function(){});

//ui stuff
ui.allowScroll(true);

function ard(){
network.httpGet("http://192.111.1.111/keyLog.txt", function(status, response) { //this is the line that you have change
//make variable equal to contents of file on http serverwasd
var x = response[0];
//write character to arduino over serial port
if(x == "w"){
arduino.write("w");
}
else if(x=="a"){
arduino.write("a");
}
else if(x == "s"){
arduino.write("s");
}
else if(x == "d"){
arduino.write("d");
}
else if(x == "x"){
arduino.write(" ");
}
});
}

var looper = util.loop(500, function() {
ard();
});


After making a new project in protocorder it shows me an error saying error type error cannot start a arduino

Reply all
Reply to author
Forward
0 new messages