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.
main.cpp
00001 #include "mbed.h" 00002 #include "Motor.h" 00003 #include "MCP.h" 00004 #include "XBee.h" 00005 #include <stdint.h> 00006 00007 #define SDA PB_7 00008 #define SCL PB_6 00009 #define MCP_ADDRESS 0x40 00010 00011 MCP MCP(SDA, SCL, MCP_ADDRESS); 00012 XBEE::ControllerData *controller; 00013 MOTOR::MotorStatus motor[MOUNTING_MOTOR_NUM]; 00014 00015 /* ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ */ 00016 00017 00018 00019 /* ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ */ 00020 00021 int main() { 00022 00023 XBEE::Controller::Initialize(); 00024 MOTOR::Motor::Initialize(); 00025 00026 __enable_irq(); 00027 00028 /* ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ */ 00029 00030 00031 00032 /* ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ */ 00033 00034 while(1) { 00035 00036 controller = XBEE::Controller::GetData(); 00037 MCP.Update(); 00038 00039 /* ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ */ 00040 00041 00042 00043 /* ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ */ 00044 00045 MOTOR::Motor::Update(motor); 00046 } 00047 }
Generated on Mon Jul 18 2022 21:54:58 by
1.7.2