Hall effect sensor PWM for Maglev.

I would like this forum to help me with the code that could suspended a ferromagnetic ball of 6g,

Post the code that you want help with. Describe what the code is supposed to do and what is wrong. Please read the "how to use the forum" stickies to see how to format and post code.

OK would like to program an arduino in other for it to suspend a ferromagnetic ball of 6g, the coil. Resistance is 2.41ohms inductance 15mH, and the sensor is hall effect sensor A1324. Attached is a schematic of the connection of the Maglev via arduino.

Many thanks
Gowon

How to write a code to suspend 6g of feromagnetic ball the schematic is attached below.