This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| project:laser_light_sensor [2015/06/26 22:48] – [Arduino schematic] dp | project:laser_light_sensor [2015/07/14 13:17] (current) – [Light diffuser] dp | ||
|---|---|---|---|
| Line 17: | Line 17: | ||
| ===== Arduino ===== | ===== Arduino ===== | ||
| - | It's recommended to test the circuit on Arduino first. You will have serial monitor available and you will be able to read LDR readings | + | It's recommended to test the circuit on Arduino first. You will have serial monitor available and will be able to see LDR values |
| ==== Arduino schematic ==== | ==== Arduino schematic ==== | ||
| Line 70: | Line 70: | ||
| ===== ATtiny (shrinking the sensor) ===== | ===== ATtiny (shrinking the sensor) ===== | ||
| - | Now that we have tested everything, we can port it to ATtiny microcontroller (tested | + | Now that we have tested everything, we can port it to ATtiny microcontroller (tested |
| ==== Programming an ATtiny with Arduino ==== | ==== Programming an ATtiny with Arduino ==== | ||
| Line 90: | Line 90: | ||
| int LDRValue = 0; // variable to store LDR values | int LDRValue = 0; // variable to store LDR values | ||
| int threshold; | int threshold; | ||
| - | float voltage; | ||
| void setup() | void setup() | ||
| Line 126: | Line 125: | ||
| {{: | {{: | ||
| - | ... and soldier other components\\ | + | ... and soldier |
| {{: | {{: | ||
| ==== Light diffuser ==== | ==== Light diffuser ==== | ||
| - | Cover the LDRs with semi-transparent material to act as light diffuser. Doing this will make sensor sensitive over bigger area. Also leave enough space between LDRs and diffuser for light to spread. You can use ping pong ball for this. | + | Cover the LDRs with semi-transparent material to act as light diffuser. Doing this will make sensor sensitive over bigger area. Also leave enough space between LDRs and diffuser for light to spread. You can use ping pong ball, or ball from vending machine. |
| ===== Tips ===== | ===== Tips ===== | ||