SED37:
I have attached an image of the program, which is very very small, if anyone could point me in the right direction, I really would be very grateful.
I have looking in the Arduino tuition areas and it’s suggesting that the line where I’m having issues (Serial1) is not being declared within that scope or section of the program, but I can’t see how my serial is either.
Program was written for an Arduino Uno, I’m using an Arduino Uno SMD Edition.
I’ve pasted the program in below (cheers for the link Delta_G Nice one)
/*
Software serial multple serial test
*/
#include <SoftwareSerial.h>
#include <string.h>
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(57600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
// Start each software serial port;
Serial1.begin(57600);
}
void loop()
{
unsigned char k,i;
while (Serial1.available() > 0)
{
k = char(Serial1.read());
Serial.write(k);
}
while (Serial.available() > 0)
{
i = char(Serial.read());
Serial1.write(i);
}
}
Its to reprogram the IP of the controller module for the relay board, using the serial port utility tool on my pc.
its using the GND and 3.3v from the uno to power the control interface and the TX and RX pins crossed over to the control interface to program both the port number and the IP.
Actually finding it really interesting, got lots of ideas for the arduino now.
once I'm a little more up to date with how to use them lol.
Why are you including SoftwareSerial, but not creating an instance of that class? It appears that you are supposed to be creating an instance called Serial1.
Relay boards don't have IP addresses, so it is impossible to tell what you are really trying to do.
PaulS:
Why are you including SoftwareSerial, but not creating an instance of that class? It appears that you are supposed to be creating an instance called Serial1.
Relay boards don't have IP addresses, so it is impossible to tell what you are really trying to do.
Hi, it's not my program and as mentioned above I'm new to this style of programing. So I'm looking for guidance if possible.
Also mentioned above is that it's the controller interface I'm trying to change the ip on and not the relay board.
It's a sainsmart 16ch ethernet relay board I'm trying to use for a project I'm on. This comprises of the relay board and a daughter board which is the communication / ethernet board.
You did not mention if you had gotten past this Serial1 problem. You don't have one and need to create a SoftwareSerial instance and give it a couple of pins. No sign of the IP changing you mentioned initially.
The YouTube video/tutorial I'm working from useschool the rx and tx pins to communicate with the module to change the IP so what I'm thinking is I should create an instance for this?
The Arduino is a go between from what I can gather, a coms protocol for the pc go via when using a program on my pc to change the IP on the sainsmart module.