I'm going to use following simple arduino sketch to blink a LED connected to a different circuit with the use of a 4N35 optocoupler.
int optocouplerPin = 2;I have prototyped following circuit and connected one end to an arduino uno at the same time other end to a 3V power source.
void setup()
{
pinMode(optocouplerPin, OUTPUT);
}
void loop()
{
digitalWrite(optocouplerPin, HIGH);
delay(1000);
digitalWrite(optocouplerPin, LOW);
delay(1000);
}
After uploading above sketch to my arduino following is my outcome :)
No comments:
Post a Comment