DC to AC with Arduino UNO ?

Hello.
I tried to convert DC to AC with uno, here is what I did :

void setup() {
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
}

void loop() {
digitalWrite(4, LOW);
digitalWrite(5, LOW);
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);

delay(20);
digitalWrite(2, LOW);
digitalWrite(3, LOW);
digitalWrite(4, HIGH);
digitalWrite(5, HIGH);
delay(20);
}

Uploaded this code to Uno.
Connected transistors to pin 2,3,4 and 5.
First group of transistors ( connected to pin 2 and 3 ) conduct 9V in a normal way.
Second group of transistors ( connected to pin 4 and 5 ) conduct 9V reversely.
My goal was to get 9V AC square wave here. When I connect a led, regardless of how I connect it,
it starts blinking rapidly. Does it mean Im succesfully getting 9VAC?
I salvaged a transformer from a 220v to 1,5v adapter. I use it reversely.
I feed 9v to the 1,5v winding and I expect to get a higher voltage from the secondary winding.
Is it okay to feed 9v to 1,5v primary winding?
I wanna feed the transformer with 9V AC and get 220V AC with low current, like a few miliampers.
But the light in the led is almost invisible when you connect it to secondary winding.
9v battery can supply 400mA I guess. Even if I succeed to step it up to 220 volts , it gives me 16
miliampers of current theoretically. Maybe that is why the led blinks almost invisibly.

1.) You need a better project description.
2.) You need to provide an actual schematic.
3.) Why do you even need an Arduino for DC to AC conversion? You can do it more easily with power electronics (no microcontroller needed).

salvaged a transformer from a 220v to 1,5v adapter. I use it reversely.

I feed 9v to the 1,5v winding and I expect to get a higher voltage from the secondary winding.

Is it okay to feed 9v to 1,5v primary winding?

That is a ratio of 147:1 so if you put 9V in it then you will get an output of 1320V.

However the current you will get out is technically known as piss all. Plus at that sort of voltage the transformer insulation will start to break down.

So what you are proposing to to is totally unfeasible.

What you are trying to build is called an inverter, and it looks like you don't understand them at all.

What is the aim of this project?