Tuesday 19 April 2011

Finally it works!

Finalmente ora funziona, errore mio dove usavo un alimentazione esterna e non la passavo tramite il Fez Domino.


Ora continuerò il mio progetto, qua un esempio di codice con video:

Servo s = new Servo((Cpu.Pin)FEZ_Pin.PWM.Di10, (Cpu.Pin)FEZ_Pin.PWM.Di9);
            s.Center();
            for (int i = 0; i < 30; i++)
            {

                Thread.Sleep(100);
                s.Left();
            }
            for (int i = 0; i < 30; i++)
            {

                Thread.Sleep(100);
                s.Right();
            }


Il servo si muove da 0 a -30 gradi e poi da -30 a 0  gradi.
Attualmente sto lavorando nella organizzazione del codice e dei thread che dovranno girare al momento della messa in funzione.

Finally works now, It was my error about the power where I had connected directly to servo and not through the Fez Domino.

Now I'm working to make the next step of my project ( up you can see a little part of code ).



The servo moves between 0 and -30 degrade and  then between -30 and 0 degrade.
Actualy I'm working to organize the code and the threads that will be executed when the project will be finished.

No comments: