scooter / Mbed 2 deprecated Scooter-uC-Programm

Dependencies:   mbed

main.cpp

Committer:
scooter_project
Date:
2015-05-19
Revision:
6:7c0a32831a4f
Parent:
5:d213c03872fe
Child:
12:bad33209d1bb

File content as of revision 6:7c0a32831a4f:

#include "mbed.h"
#include "messdatenerfassung.h"

#define PERIODEN_DAUER 10000


PwmOut mypwm(PWM_OUT); 
AnalogIn analog_value0(A0); //For Hall-Sensor

DigitalOut myled(LED1);

int main() {
  
  mypwm.period_us(PERIODEN_DAUER);
  
    while(1) {
        mypwm.pulsewidth_us(PERIODEN_DAUER*hall_umrechnung());
    }
}