hi
i have problem in my arduino mega 2560
when i want to connect Fingerprint device or RFiD reader to serial ports (RX & TX)
they didn’t work
i test them with my UNO and they work very well
but when i connect them to my mega and upload the code and open serial monitor there is nothing happed
the fingerprint didn’t turn on and start scanning the finger
i use this code to run finger print in my UNO and it work very well
but with my mega nothing happen
#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>
int getFingerprintIDez();
SoftwareSerial mySerial(2, 3);
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
void setup()
{
Serial.begin(9600);
finger.begin(57600);
}
void loop()
{
getFingerprintIDez();
}
int getFingerprintIDez()
{
uint8_t p = finger.getImage();
if (p != FINGERPRINT_OK) return -1;
p = finger.image2Tz();
if (p != FINGERPRINT_OK) return -1;
p = finger.fingerFastSearch();
if (p != FINGERPRINT_OK) return -1;
switch(finger.fingerID)
{
case 0:
Serial.println("Haider Ali ");
break;
case 1 :
Serial.println("Rida Mohammed ");
break;
}
return finger.fingerID;
}
i thought my mega have issue from factory because it’s chines clone
but i test it with XBee Pro 60mW Wire Antenna - Series 1 (802.15.4) ,connect it to rx and tx and it work very well i send data from it to another ardunio
but i use SparkFun XBee Explorer Regulated to regulate the voltage either in UNO or mega
what is the problem what do you think
is the mega depends on 3.3v or what