Can UNO handle my project? PIR, MOtor, RGB LED's ,FOG Machines,

I Tried before last Halloween to make this Prop Controller.

Taking the idea from Dead with Dave controller he made. Halloween Yard Haunt Controller Pandemic Cemetery

To give you idea it would be a Prop of Maleficent that would come to life with a person sets off the PIR then using a MP3 board and SD board attached to the Arduino a motor would turn on make her stuff spin around. With a clear ball on top of the stuff. With RGB leds in it to change colors. Also having lights around the yard RGB LED strips that would change and mach the stuff color. Turning on two for machines also. I new to programming. I know this is way hard for someone so new. But can one board handle all this. I using a UNO should I get a different board? I wrote the code. Then end up hiring someone to rewrite it for me. Because I could get a lot of stuff to work. Let me know if anyone could give me any help on this idea project. Even would pay someone for their help.

[]Sleeping Beauty - Philip Fights The Dragon](

// SimpleSDAudio - Version: Latest
#include <sd_l0.h>
#include <sd_l1.h>
#include <sd_l2.h>
#include <SimpleSDAudio.h>
#include <SimpleSDAudioDefs.h>

// Garrett_Wiseman Halloween Spell //
// You will need one Arduino Nuo // //
// one relay, one led RGB, one PIR //

int pirSensor = 9;
int Red_Led_Pin=8;
int Green_Led_Pin=7;
int Blue_Led_Pin=6;
int relay_Pin1 =5;
int relay_Pin2 =4;
int relay_Pin3 =3;
int relay_Pin4 =2;
unsigned long previousMillis = 0;
unsigned long currentMillis;
unsigned long interval1=9000; // interval for 9 seconds
unsigned long interval2=16000; //interval for 16 seconds
unsigned long interval3=18000; //interval for 18 seconds
unsigned long interval4=21000; //interval for 21 seconds
unsigned long interval5=28000; //interval for 28 seconds
unsigned long interval6=35000; //interval for 28 seconds
void setup() {
// put your setup code here, to run once:
// 4 channels relay work when set signal to LOW so initially we set HIGH
SdPlay.setSDCSPin(10); // sd card cs pin


void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(pirSensor==HIGH))
currentMillis = millis();
SdPlay.setFile(“music.wav”); // put your music file name here;
digitalWrite(Blue_Led_Pin,HIGH); //turn on blue led
digitalWrite(relay_Pin1,LOW); //turn on the relay 1
if(currentMillis - previousMillis >= interval1) //when time reaches 9 second
digitalWrite(Blue_Led_Pin,LOW); //turn off blue led
digitalWrite(relay_Pin1,LOW); //turn off the relay 1
digitalWrite(Red_Led_Pin,HIGH); //turn on the red led

if(currentMillis - previousMillis >= interval2) //when time reaches 16 second
digitalWrite(relay_Pin2,LOW); //turn on the relay 2
if(currentMillis - previousMillis >= interval3) //when time reaches 18 second
digitalWrite(relay_Pin3,LOW); //turn on the relay 3
digitalWrite(relay_Pin4,LOW); //turn on the relay 4
if(currentMillis - previousMillis >= interval4) //when time reaches 21 second
digitalWrite(Red_Led_Pin,LOW); //turn off the red led
digitalWrite(Green_Led_Pin,HIGH); //turn on the green led

if(currentMillis - previousMillis >= interval5) //when time reaches 28 second
digitalWrite(relay_Pin3,HIGH); //turn off the relay 3
digitalWrite(relay_Pin4,HIGH); //turn off the relay 4
if(currentMillis - previousMillis >= interval6) //when time reaches 35 second
digitalWrite(relay_Pin2,HIGH); //turn on the relay 2
digitalWrite(Green_Led_Pin,LOW); //turn on the green led
previousMillis=0; //reset time



Maybe this thread belongs in the gigs forum?

I would think that the Uno would be sufficient for the project you describe.

UNO seems more than adequate for what you are doing.

Your code does have a few problems:

The comparison of the input port is incorrect:

 if (digitalRead(pirSensor==HIGH)) // this compares the value of pirSensor to HIGH, then reads either port 1 (if true) or 0 (if false)

if (digitalRead(pirSensor) == HIGH) //should be written like this

You have the comparisons for the millis() timing correct, but after each of the intervals has been reached you are resetting previousMillis. The timers are all based on cumulative time since the PIR sensor triggered the sequence, so previousMillis needs to remain the same until all the timing events have completed. The way the code is written, you get to the 9 second event, then reset the timer, which causes the code to keep repeating the event at 9 seconds forever and never get beyond that point. If you simply remove the reset of previousMillis, then you will run into the problem that once you reach each timing interval, then each time through loop the test for the time interval will be true and the code will be executed repeated.

This is a classic example of what a State Machine is used for, so you might want to do some research on that topic.