Arduino Ethernet Shield and FPS-GT511C3 Conflict on Arduino Mega 2560

Hi everyone im new in Arduino. I have started a new project but i have a trouble with FPS-GT511C3 and Ethernet Shield i cant use tohether them. Could you help me ?

#include <SPI.h>
#include <Ethernet.h>
#include <SoftwareSerial.h>
#include <FPS_GT511C3.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
EthernetServer server(80);
FPS_GT511C3 fps(52, 53);

void setup() {
  Serial.begin(9600);
  Serial.println("Wait for settings");
  delay(1000);
  Ethernet.begin(mac);
  Serial.println("Ethernet has started..");
  delay(1000);
  server.begin();
  Serial.print("Server is started..");
  Serial.println(Ethernet.localIP());
  delay(2000);
  fps.Open();//If i remove this and below code then it works correctly.
  fps.SetLED(true);
  delay(2000);

  Serial.println("Everything is ok");
}

If i remove fps.Open(); project is working correctly.But i put this code i cant see "Everything is ok" text.

Pin 52 and 53 are part of the SPI bus, and the SPI bus is used for the Ethernet Shield.

Peter_n thanks for your answer..
Can you tell more things ? Which pins should i use or how can i run this project ?

I don't know the fingerprint scanner.
Sparkfun has example code : GitHub - sparkfun/Fingerprint_Scanner-TTL: Repository with example code for SEN-14585 & SEN-14585 at SparkFun.com
That code seems to use a software serial port to communicate with the scanner.
If that is the case, you need a interrupt_change input for RX, as it written about here : http://arduino.cc/en/Reference/softwareSerial
So you can use pin 10,11,12, 14,15 or an analog pin A8 ... A15. Pin 13 has a led, I should avoid that for an input.

However the Arduino Mega has 3 spare hardware serial ports. It would be easier to one of those.
[ http://arduino.cc/en/Hacking/PinMapping2560](http://" http://arduino.cc/en/Hacking/PinMapping2560")

The scanner has to be initialized and setup on a computer, did you run the software for it on a computer ?

Thanks for your reply.

I did not initialize and setup on a computer. I have to use on Arduino Mega and Ethernet Shield. Also I could not use Serial Ports for FingerPrinScanner. What should i do ?

Did you choose a library/code/sketch ?
The one from Sparkfun might be used with pins 10,11,12, 14,15 or an analog pin A8 ... A15.
But I don't know much about it, so I don't think I can help any further.

When you are trying the Sparkfun code and have a question, perhaps you could start a new topic with the word "FingerPrintScanner" in it.

Yes i choosed libraries
#include <SPI.h>
#include <Ethernet.h>
#include <SoftwareSerial.h>
#include <FPS_GT511C3.h>

I guess that SPI and Serial Software is conflict. But i cant do anything. Im in researching along time. :frowning:

I guess that SPI and Serial Software is conflict.

If you are still trying to use D52 and D53 for SoftwareSerial, then they are in conflict. D50 to D53 is used for the SPI bus on a Mega.

thanks for your reply.. i tried another pins but i couldnt anything.. Do you have any idea ?

I don't know what other pins you are trying. Only a few can be used for SoftwareSerial on a Mega.

Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).

Try D11 and D12.

are D11 and D12 used by Ethernet Shield?

Yilmes:
are D11 and D12 used by Ethernet Shield?

No. The ethernet shield has the SPI data lines on the ICSP pins only. Nothing is connected to D11 to D13 on the shield.

On the Mega, there are no SPI lines on D11 to D13. Those are on D50 to D52.

You are free to use D11 to D13 on the Mega/ethernet shield as GPIO.