Hello. I have been using arduino yun for few days. Prevously i had arduino uno r3 and used it to read analogs via USB.
My question is :
Is there any way to connect the arduino yun with the laptop using ip and port (LAN) ?
I am using VisualStudio2010 and would like to receive a data from the yun (analog) in my program.
Thank you sonnyyu for your replay. Your post was very helpful. I managed to get a flow data through the WiFi.
Nevertheless, I would have one more question connected with the the data transmission speed.
While Arduino gets : http://arduino.local/arduino/analog/1
it returns value of the analogs in the format : 1024,1024,1024,1024,1024 ( client.print(values) )
In my C# application I am downloading http text and breaking this up text for 5 peaces. string value = client.DownloadString("http://arduino.local/arduino/analog/1");
The problem is that it takes too much time to get this data from the http. Wifi signal strength is 98%. Estimated time to get the data from http is 300-500ms. In comparison with the USB data flow - which takes 1,3 ms - the Arduino YUN WiFi speed is very poor.
What would You recon to make it faster. Thank You for your help.
My guess the slowness come from bridge, however to reach response time as low as 1 ms the Web Restful service will be fail. Since it build on http protocol, it is stateless protocol.
Solution:
WebSockets are a bi-directional, full-duplex, persistent connection from a client to a server. Once a WebSocket connection is established the connection stays open until the client or server decides to close this connection. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient as well as fast.
I am using quite advanced c# application and switching into the different application would be a daunting task.
I have already created app using socket and ip commnuication.
Do you have any arduino yun server example, how to send some data using ip and port ? Or how to work with the websockets ? ( sending and receiving data )
sealima:
...
Node.js looks like a python programming.
...
sonnyyu:
Node.js is a platform built on Chrome's JavaScript runtime V8 .
sealima:
...
I am using quite advanced c# application and switching into the different application would be a daunting task.
I have already created app using socket and ip commnuication.
...
not standard socket app but WebSockets app.
sealima:
Do you have any arduino yun server example, how to send some data using ip and port ? Or how to work with the websockets ? ( sending and receiving data )