Reference file for DC Motor testing.

Dependencies:   Motor mbed

main.cpp

Committer:
christianjaunich
Date:
2014-10-02
Revision:
0:3aa70ac75ca3

File content as of revision 0:3aa70ac75ca3:

#include "mbed.h"
#include "Motor.h"

Motor motor1(p26,p29,p30);

int main()
{
    float motorspeed;
    for (motorspeed=-1.0;motorspeed<=1.0;motorspeed+=.2)
    {
        motor1.speed(motorspeed);
        printf("Motor speed is %.2f\n",motorspeed);
        getchar();
    }
    motor1.speed(0.0);
}