From fede0f306283bdc25c4c09f64a851689167f0428 Mon Sep 17 00:00:00 2001 From: Andre Aureliano Date: Sun, 28 Aug 2011 20:34:51 -0300 Subject: [PATCH] last call --- README.md | 7 +++++++ arduino_client.js | 34 ---------------------------------- 2 files changed, 7 insertions(+), 34 deletions(-) delete mode 100644 arduino_client.js diff --git a/README.md b/README.md index e69de29..18b4e32 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,7 @@ +About +===== +Arduino as a input for a web game + +License +======= +MIT License diff --git a/arduino_client.js b/arduino_client.js deleted file mode 100644 index b1ab76a..0000000 --- a/arduino_client.js +++ /dev/null @@ -1,34 +0,0 @@ -// Config -PLAYER_NAME = 'player1'; -SERIAL_PORT = '/dev/tty.usbserial-A700dE8G'; -HOST_NAME = 'localhost'; -HOST_PORT = 8080; - -var http = require('http'); -var SerialPort = require("serialport").SerialPort; -var serialPort = new SerialPort(SERIAL_PORT, {baudrate:57600}); - -var xyz = 0; - -serialPort.on("data", function (data) { - xyz = parseInt(data); - //para nao vir numeros quebrados - if (xyz>=100){ -// console.log("Dado: "+xyz); - } -}); - - - -var coordinate = '000'; -var options = { - host: HOST_NAME, - port: HOST_PORT, - path: '/fire/'+PLAYER_NAME+'/'+coordinate -}; - -// http.get(options, function(res) { -// console.log("Got response: " + res.statusCode); -// }).on('error', function(e) { -// console.log("Got error: " + e.message); -// }) \ No newline at end of file