scooter / Mbed 2 deprecated Scooter-uC-Programm

Dependencies:   mbed

Committer:
scooter_project
Date:
Tue May 26 13:40:12 2015 +0000
Revision:
9:b1bf6699d610
Parent:
8:fb6cb712eb52
Child:
11:7dfdb8074992
bremsenergier?ckgewninnug mit funktion akkuladen

Who changed what in which revision?

UserRevisionLine numberNew contents of line
scooter_project 6:7c0a32831a4f 1 #include "mbed.h"
thorb3n 8:fb6cb712eb52 2 #include "Prototypen.h"
scooter_project 6:7c0a32831a4f 3
scooter_project 6:7c0a32831a4f 4
scooter_project 6:7c0a32831a4f 5 PwmOut mypwm(PWM_OUT); //For output PWM-pin
scooter_project 6:7c0a32831a4f 6 AnalogIn analog_value0(A0); //For reading Hall-Sensor ADC-PIN
scooter_project 6:7c0a32831a4f 7
scooter_project 6:7c0a32831a4f 8 void motoransteuerung(){
scooter_project 6:7c0a32831a4f 9
scooter_project 6:7c0a32831a4f 10 mypwm.period_us(PERIODEN_DAUER); //
scooter_project 6:7c0a32831a4f 11
scooter_project 6:7c0a32831a4f 12 while(1) {
scooter_project 6:7c0a32831a4f 13 mypwm.pulsewidth_us(PERIODEN_DAUER*hall_umrechnung()); //How often to change between High and low per Period.
scooter_project 6:7c0a32831a4f 14 }
scooter_project 6:7c0a32831a4f 15 }