
Projet APP5 comm Zumo avec mbed
Dependencies: mbed PowerControl
main.cpp
- Committer:
- bouaziz
- Date:
- 2021-12-08
- Revision:
- 1:e8c4e314d8f8
- Parent:
- 0:fd4714227d8e
- Child:
- 2:d5dd5e731d4a
File content as of revision 1:e8c4e314d8f8:
#include "zumo.h" #include "PowerControl/PowerControl.h" DigitalOut myled(LED1); zumo myzumo; 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; wait(1.0); while(1) { myzumo.speed(140,140); wait(1.); myzumo.stop(); wait(1.); } }