Scooter-Programm

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
thorb3n
Date:
Thu May 14 15:45:35 2015 +0000
Commit message:
Anfang

Changed in this revision

Messdatenerfassung.h Show annotated file Show diff for this revision Revisions of this file
Motorsteuerung.h Show annotated file Show diff for this revision Revisions of this file
Rekuperation.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 0b92ec941e4d Messdatenerfassung.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Messdatenerfassung.h	Thu May 14 15:45:35 2015 +0000
@@ -0,0 +1,14 @@
+#include "mbed.h"
+AnalogIn analog_value1(A0);// PIN-Anschluss des Hall-Sensors setzen
+AnalogIn analog_value2(A0);// PIN-Anschluss des Brems-Sensors setzen
+
+float Steuerung_auslesen(){
+    float steuerung;
+    steuerung = analog_value1.read(); // liefert float zwischen 0 und 1
+    return steuerung;
+    }
+float Bremse_auslesen(){
+    float bremse
+    bremse = analog_value2.read();
+    return bremse
+    }    
\ No newline at end of file
diff -r 000000000000 -r 0b92ec941e4d Motorsteuerung.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Motorsteuerung.h	Thu May 14 15:45:35 2015 +0000
@@ -0,0 +1,14 @@
+#include "mbed.h"
+#include "Messdatenerfassung.h"
+PwmOut mypwm1(PWM_OUT);//MOSFET1 PIN EINTRAGEN
+
+MotorSteuern(){
+    if(Bremse_auslesen()< 0.5){ // Wert muss an den Sensor angepasst werden
+        float steuerung_adc;
+        steuerung_adc = Steuerung_auslesen(); // bekommt float wert aus datenerfassung, wert zwischen 0 und 1
+        mypwm1.period_ms(10);     //periodendauer entsprechend mosfet setzen    
+        mypwm1.pulsewidth_ms(1); // Pulsbreite entsprechend Mosfet setzen
+        mypwm1.write(Steuerung_auslesen()); // AN/AUS-Verhältnis nach steuerung setzen
+        }
+    }
+
diff -r 000000000000 -r 0b92ec941e4d Rekuperation.h
diff -r 000000000000 -r 0b92ec941e4d main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu May 14 15:45:35 2015 +0000
@@ -0,0 +1,8 @@
+#include "mbed.h"
+
+void main(){
+    
+    
+    
+    
+    }
\ No newline at end of file
diff -r 000000000000 -r 0b92ec941e4d mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu May 14 15:45:35 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/dbbf35b96557
\ No newline at end of file