I can control my arduino-yun using standardfirmata over USB using my nodejs application(local computer is running node.js server and the client and is directly connected to arduino-yun).
I was wondering the possible options:
1- Install node.js server on Arduino-yun and connect to Arduino-yun’s nodejs server( I would like to avoid this if possible).
2- WiFi your nodebot · GitHub
This can be an option but I need to buy another chip. I was thinking to utilise the existing arduino wifi bridge.
Please let me know what other options you may think of in this situation and I would really appreciate it.
Let me see if I understand this: You are currently running a node.js application on your PC, and it is talking to the Yun over the USB serial port, sending standard Firmata commands. You want to keep the PC in control (you don’t want to put node.js on the Yun) but want to make a wireless connection to the Yun. From your github link, it sounds like you want to the PC to make a TCP connection to the Yun, and send the Firmata commands that way. Is that right?
I can think of two ways to do it that doesn’t involve adding another WiFi interface (the Yun has a very powerful WiFi ability, why not use it? I’m sure there are more ways to accomplish this.
Use ser2net which runs on the Linux side, opens a network socket, and simply copies all communications between the network socket and the sketch’s Serial1 port. One discussion about it is here: (searching the forum for ser2net will turn up others) Bridge is slow, 4 trans/second. speed boost 21,950% from Bridge. To make use of this, besides the Linux configuration mentioned in that post, you will need to modify the Firmata sketch to use
Serial1 instead of
Modify the Firmata sketch to use a YunServer/YunClient instead of the Serial port. This will let the sketch directly manage the TCP connection. There is some additional overhead to manage the server and client, but once a connection is established, it should work transparently. This is because both Serial and YunClient derive from Stream, and that is what Firmata is expecting in the Firmata.begin() call. While there are differences in the way the streams are set up, once connected they behave exactly the same. A couple of the many examples of doing this sort of communications are here: (searching the forum for Telnet will give others)