 #define timeout 1000
 #define polling 2000
 #define retry_count 10
-
 #define TxEnablePin 2 
-
 #define LED 9
+//ID slave node 
+#define ID 10
 
 #define TOTAL_NO_OF_REGISTERS 1
 

  PACKET2,
  TOTAL_NO_OF_PACKETS // leave this last entry
};
int sensorValue = 0;        // value read from the pot
int outputValue = 0; 

Packet packets[TOTAL_NO_OF_PACKETS];


void setup()
{
  modbus_construct(&packets[PACKET1], 1, READ_HOLDING_REGISTERS, 0, 1, 0);
  modbus_construct(&packets[PACKET2], ID, PRESET_MULTIPLE_REGISTERS, 1, 1, 0);
  modbus_configure(&Serial, baud, SERIAL_8N1, timeout, polling, retry_count, TxEnablePin, packets, TOTAL_NO_OF_PACKETS, regs);
  
  pinMode(LED, OUTPUT);
