Pages: [1]   Go Down
Author Topic: TCP DIALOG between ARDUINO and VB.NET program  (Read 1537 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have this gola : collect with arduino a digital input and send it on tcp/ip to a VB.NET program that write a string on DB every time the digital input comes.

I've got 2 Option
1) Arduino is the server and open a prt, VB.NET application is a client that connect to ARDUINO port
2) Vb.NET program is the server that open a port, Arduino connect as clinet to taht port

Wich solution is better?
Logged

DK
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have setup the arduino as a tcp server in my home heating setup.
My argument was that the PC wouldn't always be on, so there was no need for the
Arduino to try to connect to it.

Hope this helps - it seems like you have posted the same question in the Italian section
Logged

'round the world...
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3102
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

get an ethernet shield and start sending the data via the Webclient example. Or... post the digital pin status to Pachube and check it online... or, put the arduino running a webserver that receives a configuration from the client computer in case you need to change something.

To be honest, whoever is the server doesn't quite make a big difference, unless you plan on using HTTP... other than that, I think that it really depends on your application. You may end up needing both cases.

Say you want to turn off a light via a web browser (or an "internet" application), then your Arduino needs to be receiving connections (being a server) so that your computer can tell it to turn off the light.

But say that you are monitoring the temperature of your living room... then Arduino needs to send data to the server, so it will be a client. See where I'm getting at?

Logged

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

Pages: [1]   Go Up
Jump to: