วันอังคารที่ 15 เมษายน พ.ศ. 2557

Our project LED

Our group AM'PM doing project about Interactive LED table.

Beginning with equipment that we need : Arduino , LED (White), Resistor ,LDR (Light sensor) is the most important. So we start with the smallest circuit by we search on internet how to make LED turn on when have low light then we do as a prototype as you see in below picture.




We try to make a simple circuit first than we build a real prototype circuit.
We use Auduino and basic code to make led light and down when hand pass.


And before we can do this circuit, we do circuit board by ourself. We use dryfilm to do. Let follow the link that our group search for doing this circuit : http://www.thaimicrotron.com/Trick/PCB/Dryfilm.htm







While we working the first circuit board its not work so we redo it again, in second time we not miss it.

This is the basic circuit that I research for using arduino with LDR
And this is a code that at first we use with our prototype at its work!

Code for LDR

int ldr = 0;             //analog pin to which LDR is connected

int ldr_value = 0;        //variable to store LDR values

void setup()

{

  Serial.begin(9600);   //start te serial monitor

}

void loop()

{

  ldr_value = analogRead(ldr);          //reads the LDR values

  Serial.println(ldr_value);                 //prints the LDR values to serial monitor

  delay(50);                  //wait

}


Then we got this!!

 




ไม่มีความคิดเห็น:

แสดงความคิดเห็น