Use my own control algorithm

I want to use px4 to test a set of algorithms I wrote myself, can I get px4 control by directly inputting the motor speed? Where should I write it?