LIGHT ON BEAT

THIS A PROJECT BASED ON THE APPLICATIONS OF HOME AUTOMATION AND ENTERTAINMENT PURPOSES . THIS CONTAINS A HC-05 BLUETOOTH FOR CONNECTIVITY WITH OUR OWN APP ,

A MIC/SOUND MODULE FOR SOUND INPUTS ,A RGB(RED,GREEN BLUE) FOR COLORS AND ARDIUNO Uno for computing the all the activity of this project

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: CIRCUIT DIAGRAM OF LIGHT ON BEAT

Step 2: DEMO

CODE FOR LIGHT ON BEAT

//code by jasnoor singh
#define REMOTEXY_MODE__HARDSERIAL

#include

// RemoteXY connection settings #define REMOTEXY_SERIAL Serial #define REMOTEXY_SERIAL_SPEED 9600 #define REMOTEXY_ACCESS_PASSWORD "rgb"

// RemoteXY configurate #pragma pack(push, 1) uint8_t RemoteXY_CONF[] = { 255,4,0,0,0,53,0,8,24,2, 3,3,86,29,11,29,8,5,19,52, 2,26,6,0,7,26,33,33,33,27, 27,27,2,26,129,0,32,4,18,6, 2,77,59,8,17,82,71,66,32,67, 111,110,116,114,111,108,108,101,114,0 }; // this structure defines all the variables of your control interface struct {

// input variable uint8_t select_1; // =0 if select position A, =1 if position B, =2 if position C, ... uint8_t rgb_1_r; // =0..255 Red color value uint8_t rgb_1_g; // =0..255 Green color value uint8_t rgb_1_b; // =0..255 Blue color value

// other variable uint8_t connect_flag; // =1 if wire connected, else =0

} RemoteXY; #pragma pack(pop)

///////////////////////////////////////////// // END RemoteXY include // /////////////////////////////////////////////

int brightness = 0; // how bright the LED is int fadeAmount = 5;

void setup() { int sensorValue = analogRead(A1); RemoteXY_Init (); // TODO you setup code pinMode(A1,INPUT); pinMode(9,OUTPUT); pinMode(10,OUTPUT); pinMode(11,OUTPUT);

}

void loop() { RemoteXY_Handler (); if ( RemoteXY.select_1==0) { analogWrite(9, RemoteXY.rgb_1_r); analogWrite(10, RemoteXY.rgb_1_g); analogWrite(11, RemoteXY.rgb_1_b); } else if ( RemoteXY.select_1==1) { int sensorValue = analogRead(A1); Serial.println(sensorValue); if((sensorValue>11)&&(sensorValue<=16)) {digitalWrite(10,HIGH); delay(20); } else if((sensorValue>=16)&&(sensorValue<=200)) {digitalWrite(11,HIGH); delay(20); } else if((sensorValue>=200)&&(sensorValue<=800)) {digitalWrite(9,HIGH); delay(20); } else {digitalWrite(11,LOW); digitalWrite(10,LOW); digitalWrite(9,LOW); } } else if(RemoteXY.select_1==2) { digitalWrite(9,HIGH); delay(2000); digitalWrite(9,LOW); digitalWrite(10,HIGH); delay(2000); digitalWrite(10,LOW); digitalWrite(11,HIGH); delay(2000); digitalWrite(11,LOW); } else {

digitalWrite(9,LOW); digitalWrite(10,LOW); digitalWrite(11,LOW); }

}

Step 3:

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    3 Discussions

    None
    HarwinderR2

    1 year ago

    very good...................

    None
    RomilK1

    1 year ago

    Very nice...keep it up...

    None
    Swansong

    1 year ago

    That's a fun simple setup to go with the music :)