Projet APP5 comm Zumo avec mbed
Dependencies: mbed PowerControl
main.cpp@1:e8c4e314d8f8, 2021-12-08 (annotated)
- Committer:
- bouaziz
- Date:
- Wed Dec 08 16:34:23 2021 +0000
- Revision:
- 1:e8c4e314d8f8
- Parent:
- 0:fd4714227d8e
- Child:
- 2:d5dd5e731d4a
projet polytech paris saclay APP5
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bouaziz | 1:e8c4e314d8f8 | 1 | #include "zumo.h" |
bouaziz | 0:fd4714227d8e | 2 | #include "PowerControl/PowerControl.h" |
bouaziz | 0:fd4714227d8e | 3 | |
bouaziz | 0:fd4714227d8e | 4 | DigitalOut myled(LED1); |
bouaziz | 1:e8c4e314d8f8 | 5 | zumo myzumo; |
bouaziz | 0:fd4714227d8e | 6 | |
bouaziz | 0:fd4714227d8e | 7 | int main() { |
bouaziz | 0:fd4714227d8e | 8 | char v[3]; |
bouaziz | 0:fd4714227d8e | 9 | Peripheral_PowerDown(LPC1768_PCONP_PCENET|LPC1768_PCONP_PCSPI|LPC1768_PCONP_PCRTC|LPC1768_PCONP_PCI2C2| |
bouaziz | 0:fd4714227d8e | 10 | LPC1768_PCONP_PCI2S|LPC1768_PCONP_PCQEI|LPC1768_PCONP_PCI2C1|LPC1768_PCONP_PCCAN1|LPC1768_PCONP_PCCAN2); |
bouaziz | 0:fd4714227d8e | 11 | //and turn off the PHY OSC |
bouaziz | 1:e8c4e314d8f8 | 12 | LPC_GPIO1->FIODIR |= 0x8000000; |
bouaziz | 1:e8c4e314d8f8 | 13 | LPC_GPIO1->FIOCLR = 0x8000000; |
bouaziz | 1:e8c4e314d8f8 | 14 | wait(1.0); |
bouaziz | 1:e8c4e314d8f8 | 15 | while(1) { |
bouaziz | 1:e8c4e314d8f8 | 16 | myzumo.speed(140,140); |
bouaziz | 1:e8c4e314d8f8 | 17 | wait(1.); |
bouaziz | 1:e8c4e314d8f8 | 18 | myzumo.stop(); |
bouaziz | 1:e8c4e314d8f8 | 19 | wait(1.); |
bouaziz | 0:fd4714227d8e | 20 | |
bouaziz | 0:fd4714227d8e | 21 | } |
bouaziz | 0:fd4714227d8e | 22 | } |