Massey 2017, Group 5, AGV control software.

Dependencies:   Commands charQueue esp8266-driver

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "wifi.h"
00003 #include "lift.h"
00004 #include "drive.h"
00005 #include "pathfinding.h"
00006 #include "positioning.h"
00007 
00008 Serial pc(SERIAL_TX, SERIAL_RX);
00009 DigitalOut led2(LED2);
00010 
00011 Wifi wifi;
00012 Lift lift;
00013 Drive drive;
00014 Pathfinding pathfinding;
00015 Positioning positioning;
00016 
00017 int main() {
00018     /* Starts other threads*/
00019     wifi.start(osPriorityHigh, 8000);
00020     lift.start(osPriorityLow, 8000);
00021     drive.start(osPriorityHigh, 1000);
00022     pathfinding.start(osPriorityLow, 8000);
00023     positioning.start(osPriorityLow, 1000);
00024     
00025     while(true) {
00026         Thread::wait(100);
00027     }
00028 }