This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== PIC Controlled Stepper motor ====== Code to send desired position to the PIC: <code cpp> void setup() { pinMode(3, OUTPUT); // sets the digital pin as output } void loop() { pulseMicroseconds(3, 1500); //1.5 mS delay(100); } /* pulseMicroseconds(int, int); * * 1.0 mS = 1000 uS --> 0 degrees * 1.5 mS = 1500 uS --> 90 degrees * 2.0 mS = 2000 uS --> 180 degrees */ void pulseMicroseconds(int pin, int dur) { digitalWrite(pin, HIGH); delayMicroseconds(dur); digitalWrite(pin, LOW); } </code>

pic_controlled_stepper_motor.1235802123.txt.gz · Last modified: 2009/02/28 06:22 by jonmash
Back to top
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0