Code works on UNO R3 not on MEGA 2560 R3

Hello

I wonder if someone here can explain,why this code is working on,UNO R3 and not on MEGA 2560 R3.

When you power up Arduino,there will be a light on pin 9,then it will flash fast,its mean no communication.(slow flash,good communication)
This code is working on UNO,but not on MEGA.

I have two MEGA 2560 R3,both its the same the code is not working.

If someone have a mega to test,use a 5mm led and connect that with a resistor 220ohm,on pin 9

there was something wrong with the arduino mega board :slight_smile:

sow this post can delete.

I wonder if someone here can explain,why this code is working on,UNO R3 and not on MEGA 2560 R3.

I find it hard to believe that it does work on a UNO:

int relayPin1 = 41; //Accessory 1
int relayPin2 = 42; //Accessory 2
int relayPin3 = 43; //Accessory 3
int relayPin4 = 44; //Accessory 4
int relayPin5 = 45; //Accessory 5
int relayPin6 = 46; //Accessory 6
int relayPin7 = 47; //Accessory 7

UNO's don't have that many pins.

Links to the libraries that you are using would be useful.

Some serial output, too.

Do you have this type of code for all the new pins?

pinMode (relayPin1, OUTPUT);

Can I have the code ? I have both UNO and Mega 2560 . I can just load and test it for u

I can test with Led13 and LED9