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
main.cpp@6:7c0a32831a4f, 2015-05-19 (annotated)
- Committer:
- scooter_project
- Date:
- Tue May 19 15:14:50 2015 +0000
- Revision:
- 6:7c0a32831a4f
- Parent:
- 5:d213c03872fe
- Child:
- 12:bad33209d1bb
motorsteuerung.cpp und prototypen.h erstellt
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| thorb3n | 1:4d1b3fffabd5 | 1 | #include "mbed.h" |
| scooter_project | 5:d213c03872fe | 2 | #include "messdatenerfassung.h" |
| scooter_project | 5:d213c03872fe | 3 | |
| scooter_project | 5:d213c03872fe | 4 | #define PERIODEN_DAUER 10000 |
| scooter_project | 5:d213c03872fe | 5 | |
| scooter_project | 4:a9eefff5ac60 | 6 | |
| scooter_project | 4:a9eefff5ac60 | 7 | PwmOut mypwm(PWM_OUT); |
| scooter_project | 4:a9eefff5ac60 | 8 | AnalogIn analog_value0(A0); //For Hall-Sensor |
| scooter_project | 4:a9eefff5ac60 | 9 | |
| scooter_project | 4:a9eefff5ac60 | 10 | DigitalOut myled(LED1); |
| scooter_project | 4:a9eefff5ac60 | 11 | |
| scooter_project | 4:a9eefff5ac60 | 12 | int main() { |
| scooter_project | 4:a9eefff5ac60 | 13 | |
| scooter_project | 5:d213c03872fe | 14 | mypwm.period_us(PERIODEN_DAUER); |
| scooter_project | 4:a9eefff5ac60 | 15 | |
| scooter_project | 4:a9eefff5ac60 | 16 | while(1) { |
| scooter_project | 5:d213c03872fe | 17 | mypwm.pulsewidth_us(PERIODEN_DAUER*hall_umrechnung()); |
| scooter_project | 4:a9eefff5ac60 | 18 | } |
| scooter_project | 4:a9eefff5ac60 | 19 | } |