Just wrote down a basic square wave to drive the transformer which is 230V AC input and 11V AC output.
This was a transformer extracted from a Guitar amplifier.
Connected the arduino from 11V side and expected to see at least half of the 230 V (If I'm not mistaken arduino supplies around 3V, right)
However when I touched the LED to 230 V side of the transformer, LED was barely blinking with a pale light.
What might be wrong with this ? Why the voltage drops even under the 5V when it passed through the transformer ?
digitalWrite(led, HIGH);
delay(20);
digitalWrite(led, LOW);
delay(20);