Go Down

Topic: WebSockets with Yun? (Read 9 times) previous topic - next topic

wayoda


Doesn't this sound like what Spacebrew does?

I don't know much about what spacebrew does.
With the outline for the pywebsocket code, a typical application would be :

  • You run the  WebSocket server on the Yun

  • You open a html page with your browser, that brings in the javascript code to open,read and write to the websocket

  • Some code that is run on the server handles the communication with the Arduino.

  • Your browser window gets updated by some javascript code that interprets the data returned from the Yun


Spacebrew seems to add a lot of extra stuff to this basic layout for an app.
Running a Spacebrew server depends on Node.js which is not available as a package for the Yun AFAIK.

But ...already mentioned ... I didn't look into Spacebrew that much...




mamu


With the outline for the pywebsocket code, a typical application would be :

  • You run the  WebSocket server on the Yun

  • You open a html page with your browser, that brings in the javascript code to open,read and write to the websocket

  • Some code that is run on the server handles the communication with the Arduino.

  • Your browser window gets updated by some javascript code that interprets the data returned from the Yun



You're absolutely right, that is exactly what I would like to have/do!
I hoped to find this missing link going from Arduino sketch to the Linino out of the box.
Plus I would like to see the lib on the Arduino to have an event like registration API.

BTW: There are already node.js implementations for Yun.


ElArtista

You can do that using the serial communication to pass info between the two environments. In the forum there is a thread talking about...

mamu


You can do that using the serial communication to pass info between the two environments. In the forum there is a thread talking about...

Did you mean this one? http://forum.arduino.cc//index.php?topic=191820.0

ElArtista

Yes I got the comunication via serial and ussing firdata. You can modify python program to interact with sockets and serial. I'm working on too...

Go Up