I'm playing with Aldebaran's NAO humanoid robot Simulator and choregraph.
I have a software in java that I would like to use to control the robot by activating its behaviors, and I believe sockets would do the trick.
My question is: is there a way to open a socket connection from within choregraph+naoSim, so I can get sensor readings and send commands to the robot?
Or any other way to connect to choregraph+naoSim to achieve the same effect?
thanks in advance!
K
I'm planning to use python websocket package to accomplish this. As far as I see the server can be written on anything. The client part - NAO - should initiate connection to the server send something, possibly wait for a reply and then carry on. So the sending functionality can be implemented using Python and coded in one of the NAO action boxes. You could even create a separate box that will take a request as a parameter and output a reply from the server. A small neat box that talk to the server.
Related
I'm trying to make a gui for phone users.If the player touches it, then it will run a script.My question is - Can I use Bindable Events to do this?
I'd recommend using RemoteEvents since BindableEvents don't communicate between the server and the client, as said in the official documentation for BindableEvent.
In this case, you want a script to execute once the client interacts with the GUI. RemoteEvents are helpful in this scenario since it communicates both with the server and the client.
You could also use RemoteFunctions to have two-way communication between the client and the server if you need the result from the server to the client.
I am currently working with STM32F103C8T6 and Quectel M66 module. I need to send some command from STM32's UART port for creating a socket connection in M66 and to send some data via that socket to a server in Quectel M66. Is there any way to do that? And I am using FreeRTOS for this.
And what kind of data are possible to send via UART port of STM32?
Any help would be greatly appreciated...Thanks in Advance
There's two ways you can achieve this:
Using AT commands and TCP/IP stack built into the module. In this mode you send AT commands to connect/listen/send/receive/close sockets.
Using PPP and TCP/IP stack inside the microcontroller. In this mode you initially configure the modem using AT commands (which you have to do in both approaches anyway), then you switch the modem to data mode, at which point it starts communicating with you using PPP protocol. You use this to integrate it with the TCP/IP stack in your microcontroller. That way you use all the functionality of the stack you choose (socket API, DNS etc.) and you're not limited to what API quectel provided. You can also take advantage of having multiple network interfaces connected to your microcontroller, for example to perform routing.
How you approach it is totally up to you. If you want just the basic socket functionality, first approach will probably be better for you as it's easier to get it to work. Second approach takes quite a bit more effort but yields better results / more flexible product for the future.
For AT commands documentation check out this link (especially the TCP/IP application note): https://www.quectel.com/product/m66.htm
I have a site and I want to allow users on that site to send information over to a second computer. That second computer would then take the information and make a physical robot do something.
The front end consists of an angularJS web app with a node.js server so that any device connected to the second computer can make the robot do something.
I'm struggling with what protocol to use in order to communicate with the second computer from the website. I tried using TCP but there were firewall issues and it doesn't seems hacky. I am thinking of either using REST or websockets but I am not sure which protocol is best suited for what I'm trying to do.
Thanks.
I'm developing an application on openwrt where I need to be able to send HTTP POST's and also receive them. This means I need to be both client and server simultaneously.
The ideia is to support the modes bellow in real time
-> poll mode - where send a POST to a server and process the answer
-> push mode - where I receive a POST from a client and have to send an answer
So far I only found libraries that implement the server or client side but never both. I could use two different libraries to achieve the result I want but it seems a bit "dirty". Here is what I found so far:
-> libcurl - Implements the client side
-> libmicrohttpd - Implements the server side
-> libwebsockets - Implements websockets but I'm not really sure is suited for what I want and needs some further testing
Someone knows a any better suited library? I'm kinda stuck at the moment :)
Not knowing any details of your application I suggest the following. Make a basic and simple solution using:
wget for poll mode
uhttpd for push mode
Write an ash script that glues these two building blocks together. Use cgi-bin to run the script in poll mode.
How can i connect a windows phone 7 device with a WiFi-enabled micro controller. Should i use socket programming?? If yes then how?? I actually want to send a text file or a text message to the micro controller using WI-FI??
Your question is a bit vague. Are you trying to write a app that enables you to send a text file/message?
or are you trying to accomplish this by connecting to the microcontroller with the default connection your phone provides.
If you want to write your own app, you can do this by using a windows socket function. Have you looked into the standard code examples windows provides? They provide good examples about the basis of windows phone wifi connectivity
in example:
Example 1
Example 2
Edit:
You should take a look at this example.
Example
In this microsoft example, they make the game tic tac too between two windows phones. For your cause, you can read the data form file. Temporarly store it in an array. And send it over wifi. if you customize the example to fit your needs, so in steps:
Declare a socket (with the right ip adresses, ports etc)
Read file
Store in array
Send array by the wifi (using your previously declared socket)
And then on the microcontroller, you need some way to filter your data out of the incomming wifi buffer. I looked into one of my older projects where i did something like this. But i couldn't find it anymore. So i must have deleted it at some point "sorry :( " i you can work this out using the example