Kheirddine Zaillel / Mbed 2 deprecated ZAILLEL_Interface

Dependencies:   TS_DISCO_F746NG mbed BufferedSerial LCD_DISCO_F746NG mbed-rtos Trigo BSP_DISCO_F746NG

Motor.cpp

Committer:
Carminio
Date:
2016-11-23
Revision:
0:88706d6abbf7
Child:
7:d51b8b7f9960

File content as of revision 0:88706d6abbf7:

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


void Motor::StartMotor_Scan()
{
    int period=40; //Frequency 25KHz
    int pulsewidth=24; //Duty cycle 60%

    period_us(period);
    pulsewidth_us(pulsewidth);
}


void Motor::StopMotor_Scan()
{
    int period=40; //Frequency 0Hz
    int pulsewidth=0; //Duty cycle 0%

    period_us(period);
    pulsewidth_us(pulsewidth);

}