Skip to content

Instantly share code, notes, and snippets.

View rondagdag's full-sized avatar

Ron Dagdag rondagdag

View GitHub Profile
@rondagdag
rondagdag / CM_RandomEyesBroadcastEventTester.cs
Created February 24, 2016 21:41
This is how I set the move type to be sent to web app in raspberry pi
using UnityEngine;
using System.Collections;
using CrazyMinnow.SALSA; // Import SALSA from the CrazyMinnow namespace
/*
Script usage instructions
This class demonstrates the use of the RandomEyes 2D/3D [Broadcast Eye Events],
and the RandomEyes 3D [Broadcast Custom Shape Events], to catch
// ------------------------------------------------------------------------------
/*
-----------------------
UDP-Receive (send to)
-----------------------
// [url]http://msdn.microsoft.com/de-de/library/bb979228.aspx#ID0E3BAC[/url]
// > receive
// 127.0.0.1 : 8051
@rondagdag
rondagdag / imu-udp.ino
Created December 30, 2015 20:42
IMU to UDP for particle photon
// This #include statement was automatically added by the Particle IDE.
#include "Kalman/Kalman.h"
#include "SparkFunLSM9DS1/SparkFunLSM9DS1.h"
#include "math.h"
unsigned long lastRead= micros();
char myIpAddress[24];
var ws = require("nodejs-websocket")
// Scream server example: "hi" -> "HI!!!"
var server = ws.createServer(function (conn) {
console.log("New connection")
conn.on("text", function (str) {
console.log("Received "+str)
conn.sendText(str.toUpperCase()+"!!!")
})
conn.on("close", function (code, reason) {
@rondagdag
rondagdag / LittlebitsNode.cs
Created December 22, 2015 23:37
Unity3d script to connect to NodeJS using WebSocketSharp
using UnityEngine;
using System.Collections;
using System;
using System.Security.Policy;
using System.Threading;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using WebSocketSharp;
using WebSocketSharp.Net;
using UnityEngine;
using System.Collections;
public class DinoController : MonoBehaviour {
GameObject player;
// Use this for initialization
Vector3 initialPosition;
public float speed = 0.1F;
public AnimationClip idleAnimation01 ;
@rondagdag
rondagdag / MindControlledBB8Droid
Created November 30, 2015 21:12
NodeJS application
var Cylon = require('cylon');
var Barcli = require("barcli");
var attentionGraph = new Barcli({
label: "attention Graph",
range: [0, 100],
});
var apiKey = '<Your API Key>';
var IFTTTMaker = require('iftttmaker')(apiKey);
var trigger_on = 'MindControlTrigger_On';