Arduino - Single LED Sensing and Emitting Light

60
0
 
Σχόλια
notreallymygoogle+name
notreallymygoogle+name - Πριν χρόνο
Brilliant! Thanks for sharing. Excellent explanation of the whole circuit and software. I'm gonna try it. Thanks!
Pete Allum
Pete Allum - Πριν χρόνο
Interesting video. When I was a kid I cut the top off an old metal canned transistor and used it to sense light. Nothing complicated but it was fun then and still is today!
Dorian McIntire
Dorian McIntire - Πριν χρόνο
Thanks for sharing that - I did the same thing as a kid. Photocells were hard to find and even though it made a lousy light sensor it was magic to have the ability to sense light. LED technology has come a long way and I'm amazed at what you can do with them today. BTW I still have some of those old metal can transistors in my antique transistor collection. I'll share it on GRvideo one of these days. Thanks for watching and commenting.
George Barnes
George Barnes - Πριν χρόνο
I am a self taught beginner level hobbiest. I found this most interesting as I had never heard that an LED has the capability to sense light.  I look forward to your course.  Thankyou.
Edmorbus
Edmorbus - Πριν χρόνο
Thanks for sharing
Are Jayem
Are Jayem - Πριν χρόνο
Forrest Mims wrote Popular Electronics articles about this, various times & years. It's a shame his extraordinary "Experimenter's Handbook" is so hard to find either in print or online. I have said publication, held together by layers on layers of tape. Far easier to find are his "mini notebooks", which are bite-sized reductions from other collections of his projects. It's strange indeed that Mims' most complicated hobbyist circuits with discrete components are now implemented quickly using PICs, Arduinos and the like.
Are Jayem
Are Jayem - Πριν χρόνο
My pleasure chatting & remembering. So you have both the small and large format PC issues. I had a boatload of them as well - not sure where they went. It was criminal when the publication of PE ended. I never got into Radio-Electronics much. Around 1964 (8yo) my dad introduced me to Knight Kit SW radios "Star Roamer" and "Space Spanner", building these tube receivers on the kitchen table much to the stress of my mother who needed a place to SERVE DINNER. Haaaa. Remember Eico, and Paia? Lafayette? POLY-PACKS? Tiny Digikey adverts at the back of PE issues? When able to drive in the early 70's, there was a Heathkit STORE still operating (Chicago area), PLUS an Olson's, which may have sold thousands of cr@p items, but such was affordable. Hell, I was riding my bicycle there before having a DL. Yes, yes with the Internet as our resource, times today are amazing. Crazy as it sounds, I wouldn't put it past one of us hobbyists to achieve anti-gravity, teleportation, or some such fantastic science. Best!
Dorian McIntire
Dorian McIntire - Πριν χρόνο
Forrest Mims was my boy-hood hero. I also have all his handbooks and many Popular Electronics issues (actually all of them - over 400 issues) loaded with his projects. I remember playing with the LED sensor idea many years ago but sensing the feeble signal required an Op-Amp.Today's Superbright LEDs produce much stronger signals - that can be greater than a volt. The Arduino A-D converter can detect signals as low as 5 millivolts so now we can detect and process these signals in very interesting ways. The project in the video would be much more complicated with the original LEDs of the day. We live in amazing times! Thanks for watching and commenting.
Vasilis Karastergios
Vasilis Karastergios - Πριν χρόνο
Thanks for the tip and project, looking forward for the arduino tutorials!
Dorian McIntire
Dorian McIntire - Πριν χρόνο
The code for the project can be cut and pasted from below
/*
Read LED as a sensor to detect light levels on A0
Use pot connected to A1 as a light threshold adjustment
level control
*/
int sensorValue; //light level value read by LED
int threshold; //Threshold adjustment to set the point at which the LED turns on
void setup(){
Serial.begin(9600); // Use to view sensor value
}
void loop(){
sensorValue = analogRead(A0); //Read LED as a sensor
//threshold = analogRead(A1); //Potentiometer level control. comment out if your putting in a threshold number
threshold = 220; //Hardcoded threshold. comment out if you're using a potentiometer
Serial.println(sensorValue); //Use to view sensor value
if(sensorValue < threshold){
pinMode(A0, OUTPUT); //Change A0 to a digital output pin
digitalWrite(A0, HIGH); // Make A0 high
tone(9,2000,500);
delay(1000); // Keep the LED on for 1 second
pinMode(A0,INPUT); //Change A0 back to an Analog input pin
}
delay(50);
}
msdesign.ru
msdesign.ru - Πριν χρόνο
A pretty good simple project to try for beginners I guess
Επόμενο