CAN Communication - winforms

How can I implement CAN communication in c# windows application. I have to create an application that communicate to the device. In earlier project I used serial port. What will be the major difference between these two.. Am new to this topic.

You need a CAN controller. I would recommend the PCAN USB from PEAK Systems.
Install the drivers
Download the PCAN API from PEAK System web page. (contains C# wrappers)
Use the API in your application to send and receive CAN frames

Related

How to control a physical robot using a web interface

I would like to know how I could control the movement of a physical robot using a web interface. For example, I have created a web interface with four movement buttons (front, back, left, right) but do not know how to connect that interface to the physical robot and control its movements. I have experience in controlling a simulated Turtlebot (in Gazebo) with the interface locally on my laptop using ROSBRIDGE and SimpleHTTPServer. Would I have to use these as well to control a physical robot?
I'm running ROS2 Crystal, Ubuntu 18.04. Thank you!
Yes, The interface to control a physical robot would be the same as simulation.
You will need to to publish control command to /cmd_vel topic and then you can subscribe to the topic to convert those velocity commands to actual motor commands.
You can also look into using Robot Web Tools for the web interface.
Additionally if you could provide more detiails about your setup I could give more information.
You can also use existing tools that allow you to quickly connect to your robot without having to build the communication infrastructure yourself. An example of that is Freedom Robotics platform that includes a variety of teleop tools for ROS.
You can find more information here (a post from their Head of Robotics) or try out for free.
I used this for a few of my personal projects and it saved me from all the hassle of creating the web interface and the API communication with ROS.

Do we need drivers for micro controller which has to communicate with mobile phones?

I am planning to build a micro controller (a switch will be attached to the embedded system which contains this micro controller) and this embedded system will be connected through a wire to mobile phone. My objective is to dial a particular number through the connected mobile phone network when the user presses the switch on the embedded system. ( planning to use AT commands for dialing). After extensive search, I have found that it is possible to do this above task. Some of the questions I have on this :
a) Do we have to install any drivers on the micro controller to communicate with mobile phone (for sending AT commands) i.e., is it sufficient if we simply code the related AT commands in the micro-controller (in C++) ?
b) Many people were using F-bus protocol for this above objective. Is there any other general protocol similar to this which can help for communicating with all mobiles (samsung,nokia,sony..)
I have read extensively in SO also. But, I have not found any question regarding the drivers. I would appreciate any kind of help
Thanks
A driver is nothing more than a software that allows your system to interact other devices, and is usually associated with Operating Systems (the driver might provide an abstraction layer for your communication). Do you plan to use an Operating System at all?
In any case, it is quite obvious that if you want to communicate to another device you need the software to do so. The question is if you write it your self or if you get an "off the shelf" solution.
In many cases, particularly when a device uses a proprietary communication protocol, you have no option but to get a driver to communicate with it, and that most likely will require you to have an Operating System.
If cellular communication is all you need, there are MUCH easier solutions available (particularly if you intend of turning your project into a product). Search for "embedded modems" or M2M solutions. There are lots of available modems to which you connect using RS232, and can send the AT commands directly. Telit and Multitech are two providers I've worked with and are really easy to interface with.

Communicating with peripherals and I/O ports from Silverlight?

Before moving towards silverlight.. I want to know if the latest version of Silverlight 5 is capable of communicating and interacting directly with I/O ports or any other USB HID devices/ peripherals?
I think the only way you could do is to run it in a browser and use pInvoke calls.

Windows Phone 7 Bluetooth/Wi-Fi

I would like to create application for Windows Phone 7, which will be communicating with desktop application via Bluetooth/Wi-Fi. Is there any API in Silverlight, which allows to use Bluetooth/Wi-Fi programatically?
Looks like bluetooth is going to be standard in the chassis spec. Unfortunately at this stage there is no api exposing Bluetooth functionality in the SDK. I think we'll have to wait and see on this one.
I understand devices will be able to inherently connect over wifi the same as 3g. No low level wifi specific api's known at this stage.

How to send UDP multicast packets through Silverlight?

I'm trying to find a way to send a udp broadcast packets through a silverlight application. Most of the research i've done lists that this is not possible through silverlight due to the support for sockets being limited to tcp only. But is there some other way to send a broadcast packet for example through javascript or something that the silverlight application can call?
Silverlight 4 supports UDP for multicast.
Articles / Examples
example of using UDP multicast support in Silverlight 4
blog entry from the System.Net Team
Classes
UdpAnySourceMulticastClient
UdpSingleSourceMulticastClient
The only plugins that support UDP client sending is Unity3D or Java. The problem mainly is when you use UDP you also need NAT punchthrough usually. So it is more complex (need a third party facilitator) since typically it is also peer to peer not just client-server.
You might be able to rig something with a proxy with Unity3D or Java but that would be a serious slowdown passing it into silverlight.
Silverlight and Flash only support TCP sockets currently.. Flash 10 does have some support for RTMFP which is UDP based but that is primarily for flash media server integration.
A response on the support of UDP in Silverlight: http://silverlight.net/forums/t/20249.aspx
You'll probably need to create your own custom browser plugin to do that for you.
As far as I know it isn't possible to use UDP with the major browser plugins, Flash, Silverlight etc. TCP is the lowest you get.
Browser based JS does not give programmatic access to UDP or even TCP. That is why you have AJAX, HTTP binding, Comet, XMPP Bosh etc. They try to emulate TCP's features with HTTP...
It appears Flash supports UDP as of Flash 10. I haven't tried it out but it sounds like it is not a low level API, only through RTMFP.
http://www.flashcomguru.com/index.cfm/2008/5/15/player-10-beta-speex-p2p-rtmfp
http://justin.everett-church.com/index.php/2008/05/23/astrop2p/
Flash Player 10.1 supports P2P with Adobe RTMFP and Stratus service. Stratus service is a Beta hosted rendezvous service that aids establishing communications between Flash Player endpoints. Unlike Flash Media Server, Stratus service mainly focuses on network address lookup and NAT traversal services for Flash Player endpoints, instead of supporting media relay, shared objects. This kind of service will also be integrated into next version of FMS.
No there isn't. Most browsers limit you to HTTP or FTP so calling out to Javascript isn't going to help either.

Resources