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.
L298LIB.h
- Committer:
- kennethdhdl
- Date:
- 2022-06-04
- Revision:
- 0:dd3d9657fd9f
File content as of revision 0:dd3d9657fd9f:
#ifndef L298LIB_h
#define L298LIB_h
#include "mbed.h"
class L298LIB
{
public:
L298LIB(PinName pinEnable, PinName pinIN1, PinName pinIN2, PinName pinIN3, PinName pinIN4);
void setSpeed(float pwmVal);
float getSpeed();
void forward();
void backward();
void stop();
void run(float velocity);
private:
PwmOut _pwm;
DigitalOut _pinIN1;
DigitalOut _pinIN2;
DigitalOut _pinIN3;
DigitalOut _pinIN4;
};
#endif