@bko
Hello every one…
I am using 2 arduino boards one as a server and other as a client .
the client get variables serially from another controller and send it to the server using UDP library
every thing goes well but once when client starts up
i mean when i power the client it sends to server successfully once, then stop sending
any advices please for urgency …
thanks
@moustafa_nabil, this forum is for Particle devices which are WiFi and GSM based. I believe you are looking for an Arduino forum!
mmmmmmmm
Um so sorry
so what i have to do now ??
@moustafa_nabil, well I see that you have two good choices. One, buy a Photon which can replace your data collecting Arduino and possibly your server since now you will have cloud connectivity out-of-the-box. The Particle community will be more than willing to help!
Or, you can do a search for an Arduino forum where you may find the answers you are looking for.
3 Likes
Just to wet your apertite to replace the duinos
Client
int oldval = 5000;
void loop()
{
int val = analogRead(A0);
if (val != oldval)
{
Particle.publish("myEvent", String(val), 60, PRIVATE);
}
delay(1000);
}
Server
void setup()
{
Particle.subscribe("myEvent", myHandler, MY_DEVICES);
}
void myHandler(const char *event, const char *data)
{
int val = atoi(data);
analogWrite(A0, val);
}
2 Likes