Show Posts
Pages: 1 [2] 3 4 5
16  Using Arduino / Project Guidance / Re: How to run Arduino on Visual Studio C#? on: March 02, 2013, 08:16:01 am
I have just installed it again after they upgraded the Debugger plugin.

sounds like you need to go into the visual studio options and set the INO and PDE extensions so that it knows to use them.
it is explained on the visual micro website.

http://www.visualmicro.com/post/2011/10/09/How-to-fix-Arduino-code-color-coding-fails-in-Visual-Studio-when-a-file-first-opens.aspx
http://www.visualmicro.com/post/2011/10/04/How-to-test-a-new-installation-of-Arduino-for-Visual-Studio.aspx

I know why you dont want to use the arduino IDE
even if the others dont get it + because we can
17  Using Arduino / Project Guidance / Re: Need help getting response from RS485 Slave on: March 02, 2013, 08:04:04 am
I copy and pasted the ifo from my last thread that was being ignored.
I know about putting the code in a code block etc.
sorry if it upsets anyone but i did try to edit the page correctly.
please dont insult me by telling me its wrong i already know
Thanks
18  Using Arduino / Project Guidance / Need help getting response from RS485 Slave on: March 02, 2013, 07:58:54 am
Code:
[code]With Nicks Gammons  RS485 Master code listed below (all be it played with by me)

http://www.gammon.com.au/forum/?id=11428  (from Nicks Site)

I want to have the slave send a response that contains data from a variable that when received by the Master can be used in my application,
the slave sends a response to a masters message but it only has a boolean response - successful transmission true/false, switching on pin 13 if false.

How can i get a  value passed back (Decimal/byte/string, any data)

My network works great for sending digital commands and i can change the channel and communicate with other slaves indepentantly.
i now want to iterogate a slave that will respond with value read from an analoge input.

I have not added the receive code as it is already available on Nicks site and would just fill the forum up with pointless amounts of code.
i would love to hear from anyone who has acheived two way comms using the RS485 Sketches and if possible could the send me a working master and slave sketch with two way communication.



[code]

#include "WConstants.h"
#include <NewSoftSerial.h>
#include "RS485_protocol.h"

NewSoftSerial rs485 (2, 3);  // receive pin, transmit pin
const byte ENABLE_PIN = 4;
int channel = 0;
int data=0;
const byte LED_PIN = 13;
int incomingByte=0; // for incoming serial data
int thousands=0; int hundreds =0; int tens =0; int ones=0;
int inByte=0;
// callback routines
  
void fWrite (const byte what)
  {
  rs485.print (what);  
  }
  
int fAvailable ()
  {
  return rs485.available ();  
  }

int fRead ()
  {
  return rs485.read ();  
  }

void setup()
{
  rs485.begin (28800);
   Serial.begin(9600);
  pinMode (ENABLE_PIN, OUTPUT);  // driver output enable
  pinMode (LED_PIN, OUTPUT);  // built-in LED
}  // end of setup
  
byte old_level = 0;

void loop()
{

  // read potentiometer

 // byte level = analogRead (0) / 4;// commented out as it is now variable being written
  byte level = (incomingByte);
  // Serial.print(level);// print to serial monitor - for testing only
  
   if (Serial.available() > 0) {       //read value from host PC
    hostprotocol();
   }
  // no change? forget it
  if (level == old_level)
    return;
      
  // assemble message
  byte msg [] = {
     1,    // device 1
     2,    // turn light on
     level // to what level
  };

  // send to slave  
  digitalWrite (ENABLE_PIN, HIGH);  // enable sending
  sendMsg (fWrite, msg, sizeof msg);
  delayMicroseconds (660);
  digitalWrite (ENABLE_PIN, LOW);  // disable sending

The following code is where i beleive the response would arrive.
i have tried adding lines of code to read a particular buffer location ie Rxdata = (buf [1]);
and then do a println to see content but nothing happens.
any suggestions would be greatly appreciated :-

[Code:}

 
// receive response  
  byte buf [20];
  byte received = recvMsg (fAvailable, fRead, buf, sizeof buf);
 
  digitalWrite (LED_PIN, received == 0);  // turn on LED if error  
  
  // only send once per successful change
  if (received)
{
    if (buf
  • != channel)
     return;  // not my device
      
    if (buf [1] != 2)
      return;  // unknown command
    
byte msg [] = {
       0,  // device 0 (master)
       data,  // turn light on command received
       //data

};
  
    old_level = level;

}

}  // end of loop
[/code]

rest of master code

[Code:]

void hostprotocol()      //Serial commands received from host
{
  inByte = Serial.read();
    switch (inByte)
    {
      
 case 79: //O  out
 
        DigitalOut();
   break;
  
  }
}
void DigitalOut() {
    
 // send data only when you receive data:
Serial.print("Digital OK");
  
 // only if there are bytes in the serial buffer execute the following code
  if(Serial.available()) {
  
     //keep reading and printing from serial untill there are bytes in the serial buffer
     //while (Serial.available()>0){
       if (Serial.available()>2){ // got 3 characters
        
// assume comes in as hundreds, tens, ones
hundreds = Serial.read() - 0x30;  // read the byte & convert from ASCII to a number
tens = Serial.read() - 0x30;
ones = Serial.read() - 0x30;

// now make into a digit
incomingByte =  hundreds*100 + tens*10 + ones;
    
 }
 Serial.print(incomingByte);
    }
 
//int value = (incomingByte);
 }
[/code]
19  Using Arduino / Networking, Protocols, and Devices / Re: Arduino RS485 communication for home automation project on: February 26, 2013, 03:13:17 pm
still not got a satifactory answer.

can some one please tell me how i can read the acknowledge
so that i can use it to pass messages back to the master

J.
20  Using Arduino / Networking, Protocols, and Devices / Re: Arduino RS485 communication for home automation project on: February 10, 2013, 12:02:45 pm
I removed the Println statements to make the code clearer for any assisting guru's to see the code as stands
i tried to place a serial.print in the received message (function) and nothing happens, no response.

as i understand it there is a response because the led does not light indicating an error.
the function works because if i remove the RS485 data pair and send a message the error led lights

so can i deduce from your comments that i am infact looking in the right area of code to see a response
and that it is your view that i should be able to view the returned message within the received function
21  Using Arduino / Networking, Protocols, and Devices / Re: Arduino RS485 communication for home automation project on: February 10, 2013, 11:40:58 am
OK,
Im not totally responsible for 70% of this code, its the sketches i am using written by Nick Gammon - this should already have been established.
I can send a message that operates Leds on the slave device.
in Nicks code the slave sends an acknowledge back which is an echo of the received message
the master unfortunately handels that as being a boolean response, either it received the message back or it didnt.

getting back to the very start, i want to know if the returned message contains the data which the slave built up in the echoed message (msg).
and if i can get the master to split the returned message into variables which i can then send back to the host pc.
unfortunately it appears the acknowledge message is queried to see if its tru or false then the function (received message) returns zero.

That in a nutshell is what i want to know
22  Using Arduino / Networking, Protocols, and Devices / Re: Arduino RS485 communication for home automation project on: February 10, 2013, 11:07:42 am
It works but i can only send digital outputs, i want to acheive getting values back.
The master code:
Code:
#include "WConstants.h"
#include <NewSoftSerial.h>
#include "RS485_protocol.h"

NewSoftSerial rs485 (2, 3);  // receive pin, transmit pin
const byte ENABLE_PIN = 4;
int channel = 0;
const int NUMBER_OF_FIELDS = 4; // t_west, t_back, t_up, t_down
int fieldIndex = 0;
int values[NUMBER_OF_FIELDS]; // temp * 10
int deviceID=0;
int function =2;
int data=0;
int RXdata=0;
int data2=0;
const byte LED_PIN = 13;
int incomingByte=0; // for incoming serial data
int thousands=0; int hundreds =0; int tens =0; int ones=0;
int inByte=0;
byte Cmd = 2;
byte old_level = 0;

// callback routines
 
void fWrite (const byte what)
  {
  rs485.print (what); 
  }
 
int fAvailable ()
  {
  return rs485.available (); 
  }

int fRead ()
  {
  return rs485.read (); 
  }

void setup()
{
  rs485.begin (28800);
   Serial.begin(9600);
  pinMode (ENABLE_PIN, OUTPUT);  // driver output enable
  pinMode (LED_PIN, OUTPUT);  // built-in LED
}  // end of setup
 
void loop()
{

byte level = (data);

   if (Serial.available() > 0) {       //read value from host PC
    hostprotocol();
   }
  // no change? forget it
  if (data == old_level)
    return;
     
  // assemble message
  byte msg [] = {
     deviceID,    // device 1
     function,    // turn light on
     data // to what level
  };

  // send to slave 
  digitalWrite (ENABLE_PIN, HIGH);  // enable sending
  sendMsg (fWrite, msg, sizeof msg);
  delayMicroseconds (660);
  digitalWrite (ENABLE_PIN, LOW);  // disable sending
 

  // receive response 
  byte buf [20];
  byte received = recvMsg (fAvailable, fRead, buf, sizeof buf);
 
  digitalWrite (LED_PIN, received == 0);  // turn on LED if error 
 
 
  // only send once per successful change
  if (received)
{
    if (buf [0] != channel)
      return;  // not my device
     
    if (buf [1] != Cmd)
      return;  // unknown command
   
byte msg [] = {
       0,  // device 0 (master)
       RXdata,
 }; 
     
       data2 = buf [2];
//delay (5);  // give the master a moment to prepare to receive     
//Serial.print (data2);
 
    old_level = data;
}
}  // end of loop

void hostprotocol()      //Serial commands received from host
{
 
 if (Serial.available()) { // Read message
    delay(100);
    while (Serial.available()) {
      char ch = Serial.read();
      if (ch >= '0' && ch <= '9') {
        values[fieldIndex] = (values[fieldIndex] * 10) + (ch - '0');
      } else if (ch == ',') {
        if (fieldIndex < NUMBER_OF_FIELDS - 1) {
          fieldIndex++;
        }
      } else if (ch == '-') {
        values[fieldIndex] = values[fieldIndex] * -1;
      } else {
       
        deviceID=(values[0]);
        values[0] = 0;
     
       function=(values[1]);
        values[1] = 0;
       
        data=(values[2]);
        values[2] = 0;
       
        data2=(values[3]);
        values[3] = 0;
   
        fieldIndex = 0;
       
      }
    }
  }
}

and slave
Code:
#include "WConstants.h"
#include <NewSoftSerial.h>
#include "RS485_protocol.h"

NewSoftSerial rs485 (2, 3);  // receive pin, transmit pin
const byte ENABLE_PIN = 4;
int channel = 1;// Device ID

int Inputvalue =0; // Input value from Master

int ledPin = 12;// digital bit weighted outputs
int ledPin1 = 11;
int ledPin2 = 10;
int ledPin3 = 9;
int ledPin4 = 8;
int ledPin5 = 7;
int ledPin6 = 6;
int ledPin7 = 5;


void fWrite (const byte what)
  {
  rs485.print (what); 
  }
 
int fAvailable ()
  {
  return rs485.available (); 
  }

int fRead ()
  {
  return rs485.read (); 
  }
 
void setup()
{
  rs485.begin (28800);
  pinMode (ENABLE_PIN, OUTPUT);  // driver output enable
  //Bit weighted gigital outputs
  pinMode(ledPin, OUTPUT);  // initialize the LED pin as an output:
  pinMode(ledPin1, OUTPUT); // initialize the LED pin as an output:
  pinMode(ledPin2, OUTPUT); // initialize the LED pin as an output:
  pinMode(ledPin3, OUTPUT); // initialize the LED pin as an output:
  pinMode(ledPin4, OUTPUT); // initialize the LED pin as an output:
  pinMode(ledPin5, OUTPUT); // initialize the LED pin as an output:
  pinMode(ledPin6, OUTPUT); // initialize the LED pin as an output:
  pinMode(ledPin7, OUTPUT); // initialize the LED pin as an output:
}

void loop()
{
  byte buf [20];
 
  byte received = recvMsg (fAvailable, fRead, buf, sizeof (buf) - 1);
 
  if (received)
    {
    if (buf [0] != channel)
      return;  // not my device
     
    if (buf [1] != 2)
      return;  // unknown command
   
    byte msg [] = {
       0,  // device 0 (master)
       3,  // turn light on command received
    };
   
    delay (5);  // give the master a moment to prepare to receive
    digitalWrite (ENABLE_PIN, HIGH);  // enable sending
    sendMsg (fWrite, msg, sizeof msg);
    digitalWrite (ENABLE_PIN, LOW);  // disable sending
   
    //analogWrite (11, buf [2]);  // set light level AS WAS JT
    Inputvalue =buf [2];// write coil value to a variable for use later JT
   // digital bit weighted outputs
   digitalWrite(ledPin, (Inputvalue >> 0 )% 2);// LSB
   digitalWrite(ledPin1, (Inputvalue >> 1)% 2);
   digitalWrite(ledPin2, (Inputvalue >> 2)% 2);
   digitalWrite(ledPin3, (Inputvalue >> 3)% 2);
   digitalWrite(ledPin4, (Inputvalue >> 4) % 2);
   digitalWrite(ledPin5, (Inputvalue >> 5) % 2);
   digitalWrite(ledPin6, (Inputvalue >> 6) % 2);
   digitalWrite(ledPin7, (Inputvalue >> 7) % 2); // MSB
   
   }  // end if something received
   
}  // end of loop
23  Using Arduino / Networking, Protocols, and Devices / Re: Arduino RS485 communication for home automation project on: February 10, 2013, 10:13:56 am
still hoping some kind individual will help by providing an answer
24  Using Arduino / Networking, Protocols, and Devices / Re: connecting 2 UNOs on: February 09, 2013, 11:34:11 am
Im currently working on an RS485 connection between arduinos
see
Arduino RS485 communication for home automation project - under networking on this forum
Im using a PC as a host to communicate with a master which in turn will communicate with up to 32 slave devices/arduinos
see Nick gammons page
http://www.gammon.com.au/forum/?id=11428
J.
25  Using Arduino / Networking, Protocols, and Devices / Re: Arduino RS485 communication for home automation project on: February 09, 2013, 11:29:13 am
Hi Paul
The parentheses probably dont need to be there as the code works, i dont know if Nicks variable which i replaced with incommingByte ( the read serial input value) had them. it could just be one of my elderly moment things.

The commented out analogue read is because Nicks master module reads an analogue value which it transmits to the slave.
i send this value from the host PC to the 485 master for transmission via the bus.

the code above is all of my master module code that i have modified from Nicks original - just add all three code segments together.
the slave is not that dissimilar to Nicks (on his web page)

i really would appreciate someone explaining the Receive part
As mentioned above i want to be able to ask a slave to get an analogue value and reply back with that value.
Jason

26  Topics / Product Design / Re: Arduino Underwater Sonar/Altimeter on: February 09, 2013, 07:05:47 am
Still working on transmitter circuit

I am currently experimenting with the circuit produced by jessica Luan in her thesis

http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDQQFjAA&url=http%3A%2F%2Fscholar.lib.vt.edu%2Ftheses%2Favailable%2Fetd-02182005-150817%2Funrestricted%2Fluan_thesis.pdf&ei=bDgWUfTHAsnH0QWurYGQDA&usg=AFQjCNEdASZ5_t20lLOTwRkOSNYm8LJHUg&sig2=VhYaT9mgS0x2ZbLcC-xz-A

Its written for Microchip PIC but should work the same with the Arduino UNO/Mega.
The clock speed is faster on the arduino for a start (16Mhz as apposed to 10Mhz).
the pulse generation code listed above produces the 40Khz required for  the transducer i have and provides 3 bursts per second.
if the arduino receives and processes the signal fast enough then i will be able the measure depth 3 time a second.
mindful the the speed of sound through water for 100m depth may not allow for 3 operations per second.
once a second should be easly acheiveable and thats good enough for me anyways.

i was given a tip the other day which was invaluable
when i measure the transducer signal use a scope lead switched to X10 as the signal is larger than expected 600v P/P
I got the advice just before i toasted my £175 china special scope.

so still working on transmitter circuit.
i have designed a pcb based on jessicas schematic and i am building it up in stages as i get each part to function

wish me luck.
27  Using Arduino / Networking, Protocols, and Devices / Arduino RS485 communication for home automation project on: February 09, 2013, 06:46:47 am
With Nicks Gammons  RS485 Master code listed below (all be it played with by me)

http://www.gammon.com.au/forum/?id=11428  (from Nicks Site)

I want to have the slave send a response that contains data from a variable that when received by the Master can be used in my application,
the slave sends a response to a masters message but it only has a boolean response - successful transmission true/false, switching on pin 13 if false.

How can i get a decimal value passed back

My network works great for sending digital commands and i can change the channel and communicate with other slaves indepentantly.
i now want to iterogate a slave that will respond with value read from an analoge input.

Code:
#include "WConstants.h"
#include <NewSoftSerial.h>
#include "RS485_protocol.h"

NewSoftSerial rs485 (2, 3);  // receive pin, transmit pin
const byte ENABLE_PIN = 4;
int channel = 0;
int data=0;
const byte LED_PIN = 13;
int incomingByte=0; // for incoming serial data
int thousands=0; int hundreds =0; int tens =0; int ones=0;
int inByte=0;
// callback routines
 
void fWrite (const byte what)
  {
  rs485.print (what); 
  }
 
int fAvailable ()
  {
  return rs485.available (); 
  }

int fRead ()
  {
  return rs485.read (); 
  }

void setup()
{
  rs485.begin (28800);
   Serial.begin(9600);
  pinMode (ENABLE_PIN, OUTPUT);  // driver output enable
  pinMode (LED_PIN, OUTPUT);  // built-in LED
}  // end of setup
 
byte old_level = 0;

void loop()
{

  // read potentiometer

 // byte level = analogRead (0) / 4;// commented out as it is now variable being written
  byte level = (incomingByte);
  // Serial.print(level);// print to serial monitor - for testing only
   
   if (Serial.available() > 0) {       //read value from host PC
    hostprotocol();
   }
  // no change? forget it
  if (level == old_level)
    return;
     
  // assemble message
  byte msg [] = {
     1,    // device 1
     2,    // turn light on
     level // to what level
  };

  // send to slave 
  digitalWrite (ENABLE_PIN, HIGH);  // enable sending
  sendMsg (fWrite, msg, sizeof msg);
  delayMicroseconds (660);
  digitalWrite (ENABLE_PIN, LOW);  // disable sending

The following code is where i beleive the response would arrive.
i have tried adding lines of code to read a particular buffer location ie Rxdata = (buf [1]);
and then do a println to see content but nothing happens.
any suggestions would be greatly appreciated :-

Code:

// receive response 
  byte buf [20];
  byte received = recvMsg (fAvailable, fRead, buf, sizeof buf);
 
  digitalWrite (LED_PIN, received == 0);  // turn on LED if error 
 
  // only send once per successful change
  if (received)
{
    if (buf [0] != channel)
      return;  // not my device
     
    if (buf [1] != 2)
      return;  // unknown command
   
byte msg [] = {
       0,  // device 0 (master)
       data,  // turn light on command received
       //data

};
 
    old_level = level;

}

}  // end of loop

rest of master code

Code:
void hostprotocol()      //Serial commands received from host
{
  inByte = Serial.read();
    switch (inByte)
    {
     
 case 79: //O  out
 
        DigitalOut();
   break;
 
  }
}
void DigitalOut() {
   
 // send data only when you receive data:
Serial.print("Digital OK");
 
 // only if there are bytes in the serial buffer execute the following code
  if(Serial.available()) {
   
     //keep reading and printing from serial untill there are bytes in the serial buffer
     //while (Serial.available()>0){
       if (Serial.available()>2){ // got 3 characters
       
// assume comes in as hundreds, tens, ones
hundreds = Serial.read() - 0x30;  // read the byte & convert from ASCII to a number
tens = Serial.read() - 0x30;
ones = Serial.read() - 0x30;

// now make into a digit
incomingByte =  hundreds*100 + tens*10 + ones;
     
 }
 Serial.print(incomingByte);
    }
 
//int value = (incomingByte);
 }
28  Using Arduino / Networking, Protocols, and Devices / Re: Modbus RTU on: February 09, 2013, 06:27:23 am
looks like you dont have the modbus rtu library installed.
the code is making refference to it but its not there.
find your arduinos program directory - look for a folder called libraries and see if its in there, if not do a google search for it, download it and add it to this folder - restart the arduino application.
and it should be ok.

29  Using Arduino / Networking, Protocols, and Devices / Still needing help with RS485 on: January 31, 2013, 01:10:51 pm
With Nicks Gammons  RS485 Master code listed below (all be it played with by me)
can someone please tell me how i can get to serial.print the received slave message from the master.
http://www.gammon.com.au/forum/?id=11428  Nick project is here.

it obviously receives something as the Led on pin d13 does not light up indicating that there is no error and that the message was acknowledged.

I would like the slave to pass messages back when polled and i believe this is already in place, i would like to be able to have several bytes sent in the return message which can be written to variable so that i can output them to the Host (pc connected to master module).
thanks
J.
Code:
#include "WConstants.h"
#include <NewSoftSerial.h>
#include "RS485_protocol.h"

NewSoftSerial rs485 (2, 3);  // receive pin, transmit pin
const byte ENABLE_PIN = 4;
int channel = 0;
int data=0;
const byte LED_PIN = 13;
int incomingByte=0; // for incoming serial data
int thousands=0; int hundreds =0; int tens =0; int ones=0;
int inByte=0;
// callback routines
 
void fWrite (const byte what)
  {
  rs485.print (what); 
  }
 
int fAvailable ()
  {
  return rs485.available (); 
  }

int fRead ()
  {
  return rs485.read (); 
  }

void setup()
{
  rs485.begin (28800);
   Serial.begin(9600);
  pinMode (ENABLE_PIN, OUTPUT);  // driver output enable
  pinMode (LED_PIN, OUTPUT);  // built-in LED
}  // end of setup
 
byte old_level = 0;

void loop()
{

  // read potentiometer

 // byte level = analogRead (0) / 4;// commented out as it is now variable being written
  byte level = (incomingByte);
  // Serial.print(level);// print to serial monitor - for testing only
   
   if (Serial.available() > 0) {       //read value from host PC
    hostprotocol();
   }
  // no change? forget it
  if (level == old_level)
    return;
     
  // assemble message
  byte msg [] = {
     1,    // device 1
     2,    // turn light on
     level // to what level
  };

  // send to slave 
  digitalWrite (ENABLE_PIN, HIGH);  // enable sending
  sendMsg (fWrite, msg, sizeof msg);
  delayMicroseconds (660);
  digitalWrite (ENABLE_PIN, LOW);  // disable sending
 
// receive response 
  byte buf [20];
  byte received = recvMsg (fAvailable, fRead, buf, sizeof buf);
 
  digitalWrite (LED_PIN, received == 0);  // turn on LED if error 
 
  // only send once per successful change
  if (received)
{
    if (buf [0] != channel)
      return;  // not my device
     
    if (buf [1] != 2)
      return;  // unknown command
   
byte msg [] = {
       0,  // device 0 (master)
       data,  // turn light on command received
       //data

};
 
    old_level = level;

}

}  // end of loop

void hostprotocol()      //Serial commands received from host
{
  inByte = Serial.read();
    switch (inByte)
    {
     
 case 79: //O  out
 
        DigitalOut();
   break;
 
  }
}
void DigitalOut() {
   
 // send data only when you receive data:
Serial.print("Digital OK");
 
 // only if there are bytes in the serial buffer execute the following code
  if(Serial.available()) {
   
     //keep reading and printing from serial untill there are bytes in the serial buffer
     //while (Serial.available()>0){
       if (Serial.available()>2){ // got 3 characters
       
// assume comes in as hundreds, tens, ones
hundreds = Serial.read() - 0x30;  // read the byte & convert from ASCII to a number
tens = Serial.read() - 0x30;
ones = Serial.read() - 0x30;

// now make into a digit
incomingByte =  hundreds*100 + tens*10 + ones;
     
 }
 Serial.print(incomingByte);
    }
 
//int value = (incomingByte);
 }

30  Using Arduino / Programming Questions / Re: help with String manipulation on: January 31, 2013, 06:47:00 am
Thanks for the replies,
i have taken onboard all of your ideas and given them all a try.

As Nick has noticed, i still working on a RS485/modbus communication project

the command was going to be the device ID xxx - a function "o" being Output (Digital) and yyy being the value/byte sent to the slave device to drive the digital values which are Bit weighted.

This was going to be the structure and would be similar format for all commands from a host PC to the RS485 master device.
the numbering format was to be 3 characters no matter what and the function would always be a character.

From Pauls earlier post the comma delimited suggestion appears to be the most simplistic and straight forward method.

It should now allow me to to create address IDs of any size - say 4000      The function command could be similar, i will probablly keep to values in 1 byte ie, 0 to 255 as Nick Gammons RS485 comms example uses Bytes in the message transfer.

Its a steep learning curve, thank you all for your assistance, much appreciated
Pages: 1 [2] 3 4 5