Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

stepper motors support

Open darkworks opened this issue 5 years ago • 1 comments

hi thanks for amazing project , am working with stepper motors , so can i control stepper motors with it ? if not how can we add stepper motor support to it

also i checked code of firmdata in the lib : https://github.com/SolidSoils/Arduino/tree/master/Solid.Arduino/Firmata

i not understand in which file have firmdata protocol definitions , as most of the files have get set methods in : https://github.com/SolidSoils/Arduino/tree/master/Solid.Arduino/Firmata

thanks

darkworks avatar Jun 30 '19 17:06 darkworks

Look in program.cs in the method SimpelTest on how to use the firmata class to control a servo on an arduino board.

        firmata.SetDigitalPinMode(11, PinMode.ServoControl);
        firmata.SetDigitalPin(11, 90);
        Thread.Sleep(500);
        int hi = 0;


        for (int a = 0; a <= 179; a += 1)
        {
            firmata.SetDigitalPin(11, a);
            Thread.Sleep(100);
            firmata.SetDigitalPort(1, hi);
            hi ^= 4;
            Console.Write("{0};", a);
        }

Of course, you'll need an arduino with a firmata sketch and a servo connected to pin 11.

jeroenwalter avatar Jul 05 '19 07:07 jeroenwalter