We basically set up our bi-directional LED the circuit according to diagram shown in the last last post. We did followed all the instruction stated the paper on the implementation of a simple bidirectional LED demo, but it just doesn’t work!! There are I think two possibilities why this is not working.
- We did something seriously wrong
- Something is wrong with the microcontroller
At the current moment, I really don’t know how to fix this but here is a picture of the setup followed by the source code
#define digi_fwd 2
#define digi_rev 3void setup(){
Serial.begin(9600);
Serial.println("Arduino");
pinMode(digi_fwd, OUTPUT);
pinMode(digi_rev, OUTPUT);
}
void loop(){
//Emitting
digitalWrite(digi_fwd, HIGH);
digitalWrite(digi_rev, LOW);
//Reverse Bias
digitalWrite(digi_fwd, LOW);
digitalWrite(digi_rev, HIGH);
//Discharge
digitalWrite(digi_rev, LOW);
pinMode(digi_rev, INPUT);
count = 0;
while(digitalRead(digi_rev)){
count++;
}
Serial.println(count, DEC);
pinMode(digi_rev, OUTPUT);
}
The Arduino Sketch can be downloaded here
No Comments Yet so far
Leave a comment
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
