Jump to content
Sign in to follow this  
chain

RS485 Shield for Arduino

Recommended Posts

The incorporation of rs485 shield is to connect two arduinos UNO using it in long distance as master/slave configuration. 
The first question is if definitively the shields can be used for this application?
The second one is if I need two shields, one on each arduino UNO to transfer the inputs/outputs data through two cables connection? This question was made to buy another shield asap. 
Third question is what cable do you recommend to make the connection between rs485 shields?
If you have any additional recommendation for this application does not hesitate in send it. 

Share this post


Link to post
Share on other sites
Guest Marcos

Seeing in your learning center I found this tutorial, http://learn.linksprite.com/arduino/shields/tuotorial-of-using-rs485-shield-v2-on-arduino/

It seems similar.

In the tutorial appears a rs485 v2, but is not available to buy it.

Let me know.

Blessings!

Please do not forget me... I'm wating for you to know about the tutorial and the version 2 of the rs485 shield to buy another arduino and another rs485 shield to combine it or buy 1 UNO with 2 new v2 shields of the rs485. 

 

Please tel me know.

 

Blessings!

Share this post


Link to post
Share on other sites

I used RS485 shield to communicate for Arduino.

 

RS485 connection

 

RS485 communication

 

Code for the transmitter:

 

 

void setup() {
  Serial.begin(9600);
}
 
void loop() {
  Serial.println ("hello Linksprite!");
  delay(1000);
}
 
 
Code for the receiver:
 
String mydata = "";
 
void setup()
{
    Serial.begin(9600);
}
 
void loop()
{
    while (Serial.available() > 0)  
    {
        mydata += char(Serial.read());
        delay(2);
    }
    if (mydata.length() > 0)
    {
        Serial.print(mydata);
        mydata = "";
    }
}

Share this post


Link to post
Share on other sites
Guest Marcos

Hi, 
 
How can I receive multiple inputs in the receiver from multiple sensors in the transmitter. 
I don't know how to do that. 

PLEASE HELP!

 

Thanks, blessings!

 

M. Soto Cora, PE, ME

Share this post


Link to post
Share on other sites

Hi, 

 

How can I receive multiple inputs in the receiver from multiple sensors in the transmitter. 

I don't know how to do that. 

PLEASE HELP!

 

Thanks, blessings!

 

M. Soto Cora, PE, ME

You can just revise the Code for the transmitter. For example:

 

int sensorPin1 = 0;
int sensorPin2 = 1;
 
void setup() {
  Serial.begin(9600);
}
 
void loop() {
  Serial.print("sensor1:");
  Serial.println (analogRead(sensorPin1));
  Serial.print("sensor2:");
  Serial.println (analogRead(sensorPin2));
  delay(1000);
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×