Controlling a brushed motor with ESC

Hi there, currently, i m trying to control the speed of a brushed motor using ardupilot mega board (APM) and arduino software(version 0018).

I have an electronic speed controller (ESC )for brushed motor but don't have datasheet of it.

The voltage required for my motor is around 7.5V, and i think the maximum current allowed for my ESC is 10mA.

First i tried to run the motor and ESC without connecting to the APM. i.e . i connect the ESC battery supply to the DC power supply and pumped in 7.5V. And i connect the signal wire to the output of function generator to produce square waves. The frequency is around 10k. I didn't connect the red wire to the supply.

The problem is the motor doesn't move at all. But the next day, i tested it again and it moved for a while then stopped, and never moved again.

I tried it with APM board also . I used one of the programs (sweep) from the servo library, but still, the motor didn't move at all..

Does anyone know what program should i use to control the speed of motor and how should i know the "arming" position of ESC coz i heard that ESC needs to be armed..

Thank you very much for your help...