Demo Code for the Automotive Gauge Stepper Motor moving the needle to several locations starting from zero initial position
Dependencies: Stepper_Motor_X27168 mbed
Revision 0:71dc3ae7e2eb, committed 2015-10-20
- Comitter:
- agarg45
- Date:
- Tue Oct 20 00:41:08 2015 +0000
- Commit message:
- Automotive Gauge Stepper Motor Demo Code ver 1.0
Changed in this revision
diff -r 000000000000 -r 71dc3ae7e2eb Stepper_Motor_X27168.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Stepper_Motor_X27168.lib Tue Oct 20 00:41:08 2015 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/teams/ECE-4180/code/Stepper_Motor_X27168/#c346170974bc
diff -r 000000000000 -r 71dc3ae7e2eb main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 20 00:41:08 2015 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" +#include "StepperMotor_X27168.h" + +StepperMotor_X27168 smotor(p25, p26, p23, p22); + +int main() { + + smotor.step_position(180); + wait(0.5); + + smotor.step_position(100); + wait(0.5); + + smotor.angle_position(270); + wait(0.5); + + smotor.step_position(0); + wait(0.5); +}
diff -r 000000000000 -r 71dc3ae7e2eb mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 20 00:41:08 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68 \ No newline at end of file