Arduino Server now in Beta Testing..

I’ve been very busy, download the zip, read the readme.txt

I’ve included all the source code to everything, my Server the client, and the arduino code, ideally some kind of header (include .h/cpp) would be good
to send and recv…

To debug it, disable the client (as only 1 program can share the com port) by simply closing it and use the Arduino IDE to make sure your board
is working… when you’re happy

run ArduinoClient.exe (sorry Windows only until someone who likes this is able to code a client in linux) the source code is all included.
(unless you wish to host, then you can run the server as well, but click on “loopback” so that it reconnects to or it will connect
to on port 1234)

Step 1. Change the com port to yours, or change the system com port to com 4.
Step 2. Click on the connect button, then click on the Establish Connection (over com port, if it errors make sure Arduino is no in use on that port)
Step 3. Click on the Send button [pin2]

you if you have an LED connected to pin2 on your arduino, the light should light up, not only that, but my LED here (if you connected) will also light

//Serial.println(“reset”); //switches off all the pins

from Arduino, just send it over the com port, the client then relays it to the server on and forward to everyone else.

I have mine on now, so if anyone tries this, i’ll see my LED’s go on and OFF, i’ve not put any effort into the server yet, eventually
i’ll be able to have it so you can forward on packets to certain arduino’s and not others, moderation, boot them off the server
etc etc…

right now, it’s proof of concept :slight_smile: - and a lot of “ugh” moments for me today lol… so if anyone tries it, switch on my LED’s
they’re all off right now :stuck_out_tongue:

Delphi Arduino Server and Client (372 KB)

So all you need to get started is an arduino some led's 2 - 7 and the client, i have mine on now, so go ahead, switch on any
of the pins from 2 - 7 from the client or in code.

void setup()
  Serial.begin( 9600 );
//7 for now... (this source code is just how i think it's done 
//if you can do better feel free.. remember you can send
//pin1 or /pin85 it just gets relayed to all the other
//arduino boards connected, so how you develop
//the protocol is up to you, all i have to do is server
//management.. or anyone else who hosts a server.

//simply connect some ids from pins 2 to 7 (not tx/recv 0/1)


void loop()
 String cstr;
 char c;
 int b = 0;
 int pin,n = 0;
 boolean pincheck;
 int pinstate;

while (Serial.available())
  c =;

  if (c=='\n' || c=='\r')  break;
//turn them off


if (cstr=="reset")  ResetPins();
if (cstr=="pin2")  digitalWrite(2,pinstate);
if (cstr=="pin3")  digitalWrite(3,pinstate);
if (cstr=="pin4")  digitalWrite(4,pinstate);
if (cstr=="pin5")  digitalWrite(5,pinstate);
if (cstr=="pin6")  digitalWrite(6,pinstate);
if (cstr=="pin7")  digitalWrite(7,pinstate);

if (cstr=="pinl2")  digitalWrite(2,pinstate);
if (cstr=="pinl3")  digitalWrite(3,pinstate);
if (cstr=="pinl4")  digitalWrite(4,pinstate);
if (cstr=="pinl5")  digitalWrite(5,pinstate);
if (cstr=="pinl6")  digitalWrite(6,pinstate);
if (cstr=="pinl7")  digitalWrite(7,pinstate);

void ResetPins()
//now turn them on based on event

  //s contains info from server, so all we do is act on it.
  //to debug, turn off the client/arduino server so you can
  //use ArduinoClient 1.0 to view the data you send here with

 //for(n=3; n>=7; n++)
 // {
 //  Serial.print("pin");
 //  Serial.print(n);
 //  Serial.println();
 //  delay(2000); 
 // }

someone just switched on pins 2 and 4 :stuck_out_tongue:

nice green and blue :stuck_out_tongue:

from the client click on [Send] from the client
and my Pin2 will come on...

to make pin2 come on yours, click on "Establish connection" on the correct port.

So it's a continuation of that thread, but now the ardino code needs to be passed to someone who knows what they're doing to make some kind
of header/object to do this, remember to close arduino/com port before trying to connect in the ArduinoClient.exe - source code included if you're
not sure what's going on...