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: mbed
Motorsteuerung.cpp
- Committer:
- scooter_project
- Date:
- 2015-05-19
- Revision:
- 6:7c0a32831a4f
- Child:
- 8:fb6cb712eb52
File content as of revision 6:7c0a32831a4f:
#include "mbed.h" #include "messdatenerfassung.h" #define PERIODEN_DAUER 10000 PwmOut mypwm(PWM_OUT); //For output PWM-pin AnalogIn analog_value0(A0); //For reading Hall-Sensor ADC-PIN void motoransteuerung(){ mypwm.period_us(PERIODEN_DAUER); // while(1) { mypwm.pulsewidth_us(PERIODEN_DAUER*hall_umrechnung()); //How often to change between High and low per Period. } }