Hello, I am trying to drive a opto-isolater from my arduino digital port and it is not able to drive the LED (the one within the opto-isolator ofcourse) when I use
digitalWrite(3, HIGH)
, but it does work when I use
analogWrite(3, 255)
.
What is the big "hardware" difference here? To my opinion it should have been the same or is:
digitalWrite(3, HIGH) == analogWrite(3, 127)
,true?
But it I should have worked using the digital way, setting the pinMode to OUTPUT and throwing it HIGH, right?
For the record:
Using this opto-isolator: MOC3041
connecting PIN1 to arduino digital port 3
port 3 is set to OUTPUT
connecting PIN2 via 1kOhm resistor to arduino ground
Already did some testing with a multimeter and different setups using different resistors but, I am not really a professional when it comes to debugging hardware.If I forgot to mention some important detail, please feel free to inquire me.