Why Arduino OPC can't connect

I want to send led data from Arduino board but can't find it in opc server.

image

#include <OPC.h>
#include <Bridge.h>
#include <Ethernet.h>
#include <SPI.h>

OPCSerial aOPCSerial;

int ledPin = 13;

bool callback(const char *itemID, const opcOperation opcOP, const bool value){
static bool ledValue = false;

if (opcOP == opc_opwrite) {
ledValue = value;

if (ledValue)  
  digitalWrite(ledPin, HIGH);
else
  digitalWrite(ledPin, LOW);

}
else

return ledValue;  

}

void setup() {
Serial.begin(9600);

pinMode(ledPin, OUTPUT);

aOPCSerial.setup();

aOPCSerial.addItem("led",opc_readwrite, opc_bool, callback);
}

void loop() {

aOPCSerial.processOPCCommands();
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.