Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stepper motors support #31

Open
darkworks opened this issue Jun 30, 2019 · 1 comment
Open

stepper motors support #31

darkworks opened this issue Jun 30, 2019 · 1 comment

Comments

@darkworks
Copy link

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

@jeroenwalter
Copy link

jeroenwalter commented Jul 5, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants