Convert c code to pde sketch file.

I am very weak in pde sketching.could anyone convert c code to pde sketch code.Thanx

By 'pde' do you mean a sketch for Arduino (pre 1.0) or for Processing? Since Arduino V1.0 the sketches use the newer '.ino' extension (Processing still uses '.pde').

It would help considerably if you posted the code.
Here is the conversion so far

Can you explain what you mean by c code to pde sketch code? You can view it in processing, but you won’t be able to compile and run it since processing uses a variation of java