This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************************/ | |
/* Copyright (c) 2014 TOYOTA MOTOR CORPORATION. All rights reserved. */ | |
/*********************************************************************/ | |
package com.example.sample; | |
import java.nio.ByteBuffer; | |
import java.util.Timer; | |
import java.util.TimerTask; | |
import android.app.Activity; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var net = require('net'); | |
var HOST = '158.199.141.247'; | |
var PORT = 222; | |
var client = new net.Socket(); | |
client.connect(PORT, HOST, function() { | |
console.log('CONNECTED TO: ' + HOST + ':' + PORT); | |
// Write a message to the socket as soon as the client is connected, the server will receive it as message from the client |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app = require('http').createServer(handler) | |
io = require('socket.io')(app) | |
fs = require('fs') | |
handler = (req, res) -> | |
fs.readFile __dirname + '/index.html', (err, data) -> | |
if err | |
res.writeHead 500 | |
return res.end('Error loading index.html') | |
res.writeHead 200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Basic MQTT example with Authentication | |
How to send MQTT data to IBM Bluemix from Intel Edison via Arduino. | |
by Rex St. John | |
*/ | |
#include <SPI.h> | |
#include <WiFi.h> |