[solved]DC motor Arduino-Processing interface (simple code not working,help)

What motor are you using (URL to web page please)? Is it rated at 4Volts, or 12Volts, or what.
You may have some

code not working

problem, but you do have some hardware/wiring problem.