Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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);
}