Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BertlTemplate2 by
Revision 5:a6f2a5a74760, committed 2017-03-08
- Comitter:
- hollegha2
- Date:
- Wed Mar 08 10:18:36 2017 +0000
- Parent:
- 4:4b71af20b3b7
- Commit message:
- V1
Changed in this revision
| BertlBlinkDemo.cpp | Show annotated file Show diff for this revision Revisions of this file |
| BertlTemplate.cpp | Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/BertlBlinkDemo.cpp Wed Mar 08 10:18:36 2017 +0000
@@ -0,0 +1,44 @@
+
+#include "mbed.h"
+#include "Serial_HL.h"
+#include "Bertl14.h"
+#include "BertlObjects.h"
+
+// nur bei den neuen Bertls
+// main=2^0 LS ENC 2^2
+BusOut boardPow(p30, P1_6, P1_7);
+
+void BlinkTask();
+Timer t1;
+
+int main(void)
+{
+ boardPow=1; wait_ms(10);
+ InitBertl();
+ pex.useISR=0; leds=9;
+ pex.ClearLeds();
+ t1.start();
+
+ while(1)
+ {
+ BlinkTask();
+
+ //
+
+ //
+ }
+ return 1;
+}
+
+void BlinkTask()
+{
+ if( t1.read_ms()>100 ) { // alle 100ms = 10Hz
+ t1.reset(); // timer neu starten
+ pex.ToggleLeds(LED_FL1|LED_FL2|LED_FR1|LED_FR2);
+ }
+}
+
+
+
+
+
--- a/BertlTemplate.cpp Tue May 24 11:44:20 2016 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-
-#include "mbed.h"
-#include "Serial_HL.h"
-#include "Bertl14.h"
-#include "BertlObjects.h"
-
-// main=2^0 LS ENC 2^2
-BusOut boardPow(p30, P1_6, P1_7);
-
-// ls5 nur beim Betrl15
-// AnalogInHL ls1(p18), ls2(p16), ls3(p19), ls4(p17); // B14
-
-AnalogInHL ls1(p18), ls2(p16), ls3(p20), ls4(p19), ls5(p17); // B15
-
-int main(void)
-{
- boardPow=1; wait_ms(10);
- InitBertl();
- pex.useISR=0; leds=9;
- pex.ClearLeds();
-
- while(1)
- {
- mL.SetPow(0.2); mR.SetPow(0.2);
- }
-
- return 1;
-}
-
-
