I'm new into Arduino and I am running into problems receiving data from serial connection using SoftwareSerial.
This is the output I am getting:
ßßÌÞÑÏÐì@ÝßßÞAá Â?cqp??a1? |l<à`ÌAA=?à°vÀýÿÿÿÿÿ#ÿ!.Ýã²Í ÿ_òì?°.²Â>ýÝüÞ]³RÒ?,þ\?î>ðpþ?æA?Íÿæ ??ý3... and so on...
I tried to convert it or also changed the pins (though rx and tx were wrong)
This is my code:
#include <SoftwareSerial.h>
char c;
SoftwareSerial mySerial(4, 5); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(4800); //I tried 4098 and the original setting too...
Serial.println("Goodnight moon!");
// set the data rate for the SoftwareSerial port
mySerial.begin(4800);
mySerial.println("Hello, world?");
}
void loop() // run over and over
{
if (mySerial.available()) Serial.print(mySerial.read());
if (Serial.available()) mySerial.write(Serial.read());
}
This is my setting:
Arduino UNO is connected over USB to my computer, I am using SoftwareSerial. PIN 4 is connected to TX, PIN 5 to RX, GND is connected to GND on the board of a webcam (7links robocam PX3309). I did not connect +5V on webcam side to +5V of the arduino, as the +5V is already powering the Webcam.
I did find the RX,TX,GND and VCC lines of the webcam from this website:
Thank you very much for your help. I did search for a solution first, but as far as I know know Arduino should transfer the receiving data to readable format automaticly...
Still no luck. How can I get the right baud rate? I tried a few different..
As the manual does not contain information about the serial connection of the cam, I do not have a clue about the baud rate.
cotwild:
As the top one was the wrong one to play with anyway... did set it back to 4800 and start playing with the mySerial baud rate...
The baud rate is specified in two different places and must be the same. In your sketch the serial.begin() statement tells the sketch what speed to send and receive at. In the serial monitor on the bottom right is a menu to select what baud rate the serial monitor should send and receive at. Make those match or you will never see good serial data.
What obviously just seems to be the ASCII values of the hieroglyphes I had before... what's going wrong? When I'm setting both to 4800 or 115200, same wierd behaviour...
Don't the baud rates just have to match on both sides? but as I am using one serial connection PC-Arduino and one between Arduino and the webcam, the speeds can be different.. right?
Sounds like the webcam is setup to be connected to a pc serial port, is that right. If so, you need to invert the polarity of the signals because that's what happens when they go thru a MAX232 to get converted to RS232 voltages. Your baud rate may be correct, but the pins are inverted. Can the softwareserial library accommodate that?
I was trying the whole day to fix that problem and didn't get any step closer. You guys just brought me further
I try to send commands over Wifi to the webcam, that passes them further to control the arduino.
There was a problem in the link, the baud=*** wasn't the exact baud rate. It is a code that defines the speed. When I do set it to 12 (4800) i do get the following output: