i have a problem about current , and i need to undersand where is the problem:
when i connect the pin 12 "high" to led and ground with a amps a read 75mA !!
i used a arduino mega , but the current max of arduino is 40mA
have you in explication
Don't do that! You must limit the current with a resistor or you risk permanently
damaging the Arduino.
The 40mA is the maximum you should attempt to draw from a pin, not the maximum
that will flow if you short it out... Shorting out an output pin will overload the output
transistor.