Arduino Mega - 32 channel relay, Switchiing on and off.

Hello Everyone,

My Plan.

I want to light my home's outer walls with AC Rice LED ( I have at least 200 strips of 70-100 feet 220-240V AC).. With few ardunio mega and many 8 channel relay board

In starting i ordered
1x Arduino Mega
3x 8 channel relay board (5v)
1x ESP8266 Wi-Fi module for switching between LED scripts

I have 4 AXT power supply i converted 2 of them to a bench power supply as source power of my Arduino mega and relay boards... these atx power supply capable of providing 10-20 A at 3.3 v rail, 20-40 A on 5 v rail and 8-20 A on 12 V rail

In starting I want it to be small project and simple.
Few things you all should know about me,
I am good with electronics.
I am good with mechanical parts
But i am very very bad when it comes to codding part...suppose I have zero knowledge of languages..

so i will be needing help with how to write code for switching on and off in sequence and randomly 32 channel relay...
i will appreciate any help you all guys provide.. if anyone can write codes for me...

Today i have downloaded some codes from google and edited it for 8 relays simple on and off

I Want to relay to be Random switch on and off some time chasing anyone one would like guide me in wright way to go ...

/-----( Import needed libraries )-----/
/-----( Declare Constants )-----/
#define RELAY_ON 0
#define RELAY_OFF 1
/-----( Declare objects )-----/
/-----( Declare Variables )-----/
#define Relay_1 2 // Arduino Digital I/O pin number
#define Relay_2 3
#define Relay_3 4
#define Relay_4 5
#define Relay_5 6
#define Relay_6 7
#define Relay_7 8
#define Relay_8 9

void setup() /****** SETUP: RUNS ONCE ******/
{
//-------( Initialize Pins so relays are inactive at reset)----
digitalWrite(Relay_1, RELAY_OFF);
digitalWrite(Relay_2, RELAY_OFF);
digitalWrite(Relay_3, RELAY_OFF);
digitalWrite(Relay_4, RELAY_OFF);
digitalWrite(Relay_5, RELAY_OFF);
digitalWrite(Relay_6, RELAY_OFF);
digitalWrite(Relay_7, RELAY_OFF);
digitalWrite(Relay_8, RELAY_OFF);

//---( THEN set pins as outputs )----
pinMode(Relay_1, OUTPUT);
pinMode(Relay_2, OUTPUT);
pinMode(Relay_3, OUTPUT);
pinMode(Relay_4, OUTPUT);
pinMode(Relay_5, OUTPUT);
pinMode(Relay_6, OUTPUT);
pinMode(Relay_7, OUTPUT);
pinMode(Relay_8, OUTPUT);
delay(4000); //Check that all relays are inactive at Reset

}//--(end setup )---

void loop() /****** LOOP: RUNS CONSTANTLY ******/
{
//---( Turn all 8 relays ON in sequence)---
digitalWrite(Relay_1, RELAY_ON);// set the Relay ON
delay(1000); // wait for a second
digitalWrite(Relay_2, RELAY_ON);// set the Relay ON
delay(1000); // wait for a second
digitalWrite(Relay_3, RELAY_ON);// set the Relay ON
delay(1000); // wait for a second
digitalWrite(Relay_4, RELAY_ON);// set the Relay ON
delay(1000);
digitalWrite(Relay_5, RELAY_ON);// set the Relay ON
delay(1000); // wait for a second
digitalWrite(Relay_6, RELAY_ON);// set the Relay ON
delay(1000); // wait for a second
digitalWrite(Relay_7, RELAY_ON);// set the Relay ON
delay(1000); // wait for a second
digitalWrite(Relay_8, RELAY_ON);// set the Relay ON
delay(4000); // wait see all relays ON

//---( Turn all 8 relays OFF in sequence)---
digitalWrite(Relay_1, RELAY_OFF);// set the Relay OFF
delay(1000); // wait for a second
digitalWrite(Relay_2, RELAY_OFF);// set the Relay OFF
delay(1000); // wait for a second
digitalWrite(Relay_3, RELAY_OFF);// set the Relay OFF
delay(1000); // wait for a second
digitalWrite(Relay_4, RELAY_OFF);// set the Relay OFF
delay(1000);
digitalWrite(Relay_5, RELAY_OFF);// set the Relay OFF
delay(1000); // wait for a second
digitalWrite(Relay_6, RELAY_OFF);// set the Relay OFF
delay(1000); // wait for a second
digitalWrite(Relay_7, RELAY_OFF);// set the Relay OFF
delay(1000); // wait for a second
digitalWrite(Relay_8, RELAY_OFF);// set the Relay OFF
delay(4000); // wait see all relays OFF

}//--(end main loop )---

//( THE END )**

Hi,
Start with what you have and learn...

Read Arduino Power (Includes relays)

But start at the beginning. See This Beginner How-To.

We are not likely to write code for you. That is a business job, and there are people you would pay to write code for you. If you get started and have questions, this is the right place.

if anyone can write codes for me...

If you want code written for you, post in the Gigs and Collaborations section. Expect to pay.

If you use an ESP8266 you don't really need a Mega (for the project as described). The ESP can be programmed using the Arduino IDE after installing the Arduino core for ESP8266. Connect a couple of MPC23017 I2C expanders to the ESP and you will have 32 channels of digital I/O to control the relays.

Thanks for the info...but need a lot of help.. i have add my code... Help me out