3D on CRTs, need a low frequency sq.wave

Hi! I'm new to Arduino, i was trying to put 3D on a 100 Hz CRT, i need a code for generating a low frequency square wave. i tried using the code tone but what i obtain on the output doesn't match the frequency that is written on the code. The square wave should be like 100 Hz or lower. I need only this code for a moment.

Soon i'll post the code i'm using right now that doesn't work.

Thanks in advance!

Have a look at the blink without delay example in the IDE.

Ok, i tried, it worked, i have generated the square wave at a low frequency but i still can't see any 3D effect. I'll explain: i need to synchronize two signals. At the input pin of Arduino uno i have a square wave at a frequency of 24 to 26 Hz, i need to output a square wave doubled in frequency syncronized with the input one.
Can someone tell me what functions i should use?

See reply #1.
Dividing a generated frequency by two is trivial arithmetic.

I'm unclear what you mean by "3D effect".

I'll explain: to see 3D on the screen i have to sync a pair of wired shutter glasses with the refresh rate of the tv. Since it has got 100hz of refresh rate and the signal tha goes in is 50 Hz i need to double the signal and calibrate it accurately to be in sync. The shutter glasses consinsts in two small LCDs that block the light. When the left Image is displayed on the screen, the right LCD goes black, the same with the right Image, the left LCD goes black and you see the right Image only on the right eye. this procedure for 100 times a second. The problem is that i am new to Arduino and i guess my code is wrong :frowning: i've tried using the function pulseIn to read the signal ( a square wave that indicates the two fields of the interlaced video signal) but it doesn't work, i'm using Arduino Uno, i will post the code in a few minutes, it's very simple.

here is one of the code i made:
Int pinIn = 3;

int duration;

void setup() {
pinMode(pinIn, INPUT);
pinMode(13, OUTPUT);

void loop() {
duration = pulseIn(pinIn, HIGH); //read video sync signal
digitalWrite(13, HIGH),//output video sync signal untouched
delay(duration1000);// with conversion microsec to millisec
digitalWrite(13, LOW);

If the input signal is symmetric, you simply toggle the output on each rising and falling edge of the input.
No timing necessary.

I think AWOL means output a pulse on each edge with a width that is a quarter of the period of the input.