Scooter-Programm

Dependencies:   mbed

Committer:
thorb3n
Date:
Thu May 14 15:45:35 2015 +0000
Revision:
0:0b92ec941e4d
Anfang

Who changed what in which revision?

UserRevisionLine numberNew contents of line
thorb3n 0:0b92ec941e4d 1 #include "mbed.h"
thorb3n 0:0b92ec941e4d 2 AnalogIn analog_value1(A0);// PIN-Anschluss des Hall-Sensors setzen
thorb3n 0:0b92ec941e4d 3 AnalogIn analog_value2(A0);// PIN-Anschluss des Brems-Sensors setzen
thorb3n 0:0b92ec941e4d 4
thorb3n 0:0b92ec941e4d 5 float Steuerung_auslesen(){
thorb3n 0:0b92ec941e4d 6 float steuerung;
thorb3n 0:0b92ec941e4d 7 steuerung = analog_value1.read(); // liefert float zwischen 0 und 1
thorb3n 0:0b92ec941e4d 8 return steuerung;
thorb3n 0:0b92ec941e4d 9 }
thorb3n 0:0b92ec941e4d 10 float Bremse_auslesen(){
thorb3n 0:0b92ec941e4d 11 float bremse
thorb3n 0:0b92ec941e4d 12 bremse = analog_value2.read();
thorb3n 0:0b92ec941e4d 13 return bremse
thorb3n 0:0b92ec941e4d 14 }