scooter / Mbed 2 deprecated Scooter-uC-Programm

Dependencies:   mbed

Committer:
thorb3n
Date:
Tue Jun 09 11:17:32 2015 +0000
Revision:
11:7dfdb8074992
Parent:
9:b1bf6699d610
Child:
12:bad33209d1bb
messdaten bearbeitet;

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
thorb3n 11:7dfdb8074992 6 AnalogIn analog_value0(A0); //For reading Hall-Sensor ADC-PIN
thorb3n 11:7dfdb8074992 7
thorb3n 11:7dfdb8074992 8 void motoransteuerung()
thorb3n 11:7dfdb8074992 9 {
thorb3n 11:7dfdb8074992 10
thorb3n 11:7dfdb8074992 11 mypwm.period_us(PERIODEN_DAUER); //
scooter_project 6:7c0a32831a4f 12
scooter_project 6:7c0a32831a4f 13 while(1) {
thorb3n 11:7dfdb8074992 14 if(break_value==0) {
thorb3n 11:7dfdb8074992 15 mypwm.pulsewidth_us(PERIODEN_DAUER*hall_umrechnung()); //How often to change between High and low per Period.
thorb3n 11:7dfdb8074992 16 }
scooter_project 6:7c0a32831a4f 17 }
thorb3n 11:7dfdb8074992 18 }
scooter_project 6:7c0a32831a4f 19 }