Railway Challenge / Mbed 2 deprecated challenge-ChaiUpdated

Dependencies:   mbed millis

Files at this revision

API Documentation at this revision

Comitter:
cdevarakonda
Date:
Mon Jun 20 17:12:18 2022 +0000
Parent:
32:771f6d99a77b
Commit message:
Energyy Storage code updated, pins changed

Changed in this revision

definitions.cpp 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
--- a/definitions.cpp	Mon Jun 20 09:49:27 2022 +0000
+++ b/definitions.cpp	Mon Jun 20 17:12:18 2022 +0000
@@ -84,9 +84,9 @@
 
 ///Eergy Storage;
 
-AnalogIn vref_powercab(PA_3);
+AnalogIn vref_powercab(PA_0);
 AnalogIn vref_supercap(PF_5);
-AnalogIn vout_powercab(PC_3);
+AnalogIn vout_powercab(PB_1);
 AnalogIn vout_supercap(PF_3);
 
 ///Lights
--- a/main.cpp	Mon Jun 20 09:49:27 2022 +0000
+++ b/main.cpp	Mon Jun 20 17:12:18 2022 +0000
@@ -120,9 +120,9 @@
     float energy_supercap = (1/2) * (current_supercap * current_supercap) * (t*t) / C;
     float energy_powercab = (1/2) * (current_powercab * current_powercab) * (t*t) / C;
     int scap = static_cast<int>(energy_supercap);
-    int pcab = static_cast<int>(energy_powercab);
-    remote.sendData(2,scap);
-    remote.sendData(2,pcab);
+    int pcab = static_cast<int>(current_powercab);//(current_powercab);
+    remote.sendData(9,scap);
+    remote.sendData(10,pcab);
     
 }