Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Week 4 assignments by group 11
- #include <project.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include "FreeRTOS.h"
- #include "task.h"
- #include "Motor.h"
- #include "Ultra.h"
- #include "Nunchuk.h"
- #include "Reflectance.h"
- #include "Gyro.h"
- #include "Accel_magnet.h"
- #include "LSM303D.h"
- #include "IR.h"
- #include "Beep.h"
- #include "mqtt_sender.h"
- #include <time.h>
- #include <sys/time.h>
- #include "serial1.h"
- #include <unistd.h>
- //Assignment 1 by Olli
- #if 1
- void zmain(void)
- {
- IR_Start();
- while(true)
- {
- vTaskDelay(100);
- if(SW1_Read() == 0)
- {
- motor_start();
- motor_forward(50,300);
- motor_forward(0,0);
- IR_wait();
- printf("IR command received\n");
- motor_forward(50,2350);
- motor_stop();
- while(true)
- {
- vTaskDelay(100);
- }
- }
- }
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement