0

I want to communicate arduino using C#. However I don't want to communicate any arduino. I want to find specific arduino. For example, if I'm using arduino nano and I embed my codes in it, I want to find arduino nano using C#. But I don't know how. Please help.

rhsn
  • 51
  • 1
  • 7
  • How is the arduino connected to your computer? What information in the arduino makes it a unique **arduino nano** which can be distinguished from any other arduino? – Mong Zhu Feb 24 '17 at 09:47
  • Actually, I want to search only one arduino that I connect my computer in two arduino that I used same time – rhsn Feb 24 '17 at 11:09
  • I don't posses any arduinos. How do you distinguish them? apart from just looking at them. I mean on the technological level? does the communication differ? do they have something like a signature that they can send? do you have a manual or something? – Mong Zhu Feb 24 '17 at 11:12
  • Actually, Arduinos is similar to each other. using C#, I want search them with name of them – rhsn Feb 24 '17 at 11:18
  • Possible duplicate of [How to auto-detect Arduino COM port?](http://stackoverflow.com/questions/3293889/how-to-auto-detect-arduino-com-port) – gre_gor Feb 24 '17 at 13:58
  • I saw this link but I have different aim – rhsn Feb 24 '17 at 14:04

2 Answers2

1

Ok I give it a shot:

In Identifying your Arduino board from code the author describes that you need to get board specifics And this information is actually available in a file called board.txt inside your arduino install folder. For him it is G:\arduino-1.6.5\arduino-1.6.5-r5\hardware\arduino\avr\boards.txt. For each board there is a section inside that file.

Further help you probably can find in How can I detect which arduino board (or which controller) in software?.

I wish good luck!

Community
  • 1
  • 1
Mong Zhu
  • 23,309
  • 10
  • 44
  • 76
0

What I am about to say applies not only in C#, but in every platform.
In order for two devices to communicate, a network is needed.

Your program needs to have some sort of means to communicate with the device,
For example, an IP address.

You can then use the TcpClient class to send it messages via a socket,
As the most basic of options.

Eyal Perry
  • 2,255
  • 18
  • 26