Projet APP5 comm Zumo avec mbed

Dependencies:   mbed PowerControl

Files at this revision

API Documentation at this revision

Comitter:
bouaziz
Date:
Wed Dec 08 08:46:22 2021 +0000
Child:
1:e8c4e314d8f8
Commit message:
projet zumo avec mbed

Changed in this revision

PowerControl.lib 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PowerControl.lib	Wed Dec 08 08:46:22 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/teams/Projet_temp_sensors/code/PowerControl/#d37f2d5a0362
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Dec 08 08:46:22 2021 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+#include "PowerControl/PowerControl.h"
+
+DigitalOut myled(LED1);
+Serial  ser(p9,p10);
+
+int main() {
+    char v[3];
+    Peripheral_PowerDown(LPC1768_PCONP_PCENET|LPC1768_PCONP_PCSPI|LPC1768_PCONP_PCRTC|LPC1768_PCONP_PCI2C2|
+                          LPC1768_PCONP_PCI2S|LPC1768_PCONP_PCQEI|LPC1768_PCONP_PCI2C1|LPC1768_PCONP_PCCAN1|LPC1768_PCONP_PCCAN2);
+    //and turn off the PHY OSC
+     LPC_GPIO1->FIODIR |= 0x8000000;
+     LPC_GPIO1->FIOCLR = 0x8000000;
+     
+    ser.baud(38400);
+    while(1) {     
+        wait(0.1);
+        ser.putc('A');
+        v[0]=ser.getc();
+        printf("%c\r\n",v[0]);
+        myled = (v[0]-'A' ==1 ? 1:0);
+        
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Dec 08 08:46:22 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file