So I built a thing yesterday. I call it RoboFinger. It's a Phoenix webserver that allows control of a robot arm using websockets. It requires a leap motion and a robot arm, but if you use those, you get this:

The code

def event(socket, "rotation:hand", %{"x" => x, "y" => y, "z" => z}) do
  val = map(x, 0, 180, -1, 1)
  Exroboarm.Client.hip(:roboarm, val, 10)
def event(socket, "bone_directions:index_finger", %{"first" => first, "second" => second, "third" => third}) do
  Exroboarm.Client.shoulder(:roboarm, first + 90, 10)
  Exroboarm.Client.elbow(:roboarm, second, 10)
  Exroboarm.Client.wrist(:roboarm, (90 - third), 10)

That's about the easiest websocket implementation I can imagine :)

Josh Adams is a developer and architect with over eleven years of professional experience building production-quality software and managing projects. Josh is isotope|eleven's lead architect, and is responsible for overseeing architectural decisions and translating customer requirements into working software. Josh graduated from the University of Alabama at Birmingham (UAB) with Bachelor of Science degrees in both Mathematics and Philosophy. He runs the ElixirSips screencast series, teaching hundreds of developers Elixir. He also occasionally provides Technical Review for Apress Publishing, specifically regarding Arduino microprocessors. When he's not working, Josh enjoys spending time with his family.