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.
DRIBBLE.cpp
- Committer:
- lorenzodunau
- Date:
- 2022-05-13
- Revision:
- 31:61f9fca504dd
File content as of revision 31:61f9fca504dd:
/** * @file MX12.ccp * @brief This file contains all the methods of the MX12 class * whose prototypes are in the MX12.h header file */ #include "DRIBBLE.h" #include "math.h" dribbleur::dribbleur(PinName tx) : _moteurDribble(tx) // initializes UnbufferedSerial object { _moteurDribble.pulsewidth_us(0); _moteurDribble.period_us(100); }; void dribbleur::SetSpeed(int pourcentage) { _moteurDribble.pulsewidth_us(pourcentage); }; void dribbleur::test() { SetSpeed(10); }; void dribbleur::SetSpeedSmooth() { int i; for (i=0;i<=30;i=i+1){ SetSpeed(i); thread_sleep_for(100); }; };