Hello, I need help to connect a fingerprint device which uses rs485. I am using SoftwareSerial in Arduino, and then I am using pins 8 and 9 for RX and TX respectively.
The connection is basically like this:
FINGERPRINT DEVICE ==> RS485/232 CONVERTER ==> ARDUINO YUN
I am pretty sure that i have connected the circuit in the right way, but I dont know if I have to do a configuration in Arduino or at least, how it works?? I set it up for 9600 baud, 8N1
I tested the FP device with a laptop, the RS485/232 converter and a Serial/USB converter and I get exactly what I sent, therefore the RS485/232 converter is working well, it can communicates with my laptop and sends the data. Then I connect it with Arduino YUN and i dont get anything, not even a rare symbol.
I know SoftwareSerial is working well because I have an HID card reader and it works perfectly when i change the DB9 connector to this HID device, i get the correct data.
I hope you can help me, I attached the code and some pictures of my connection.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(8, 9); // RX, TX
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(57600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("Goodnight moon!");
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
mySerial.println("Hello, world?");
}
void loop() { // run over and over
if (mySerial.available()) {
Serial.write(mySerial.read());
}
if (Serial.available()) {
mySerial.write(Serial.read());
}
}
I dont know if Arduino YUN is already working 9600 baud, 8 data size, 1 stop bit, no parity. Well, i know it's working with 9600 because i set that in the code, but i dont know the rest.
