GroupA / Mbed 2 deprecated WaG_final

Dependencies:   mbed

Fork of Lab_6_WaG by GroupA

Committer:
phn10
Date:
Thu Apr 26 16:12:09 2018 +0000
Revision:
77:73e1cf3a7284
Parent:
75:49e69031799c
Child:
78:84ce90a76594
Fixed station errors

Who changed what in which revision?

UserRevisionLine numberNew contents of line
spm71 51:1eb60f0d2f03 1 /******************************************************************************
spm71 51:1eb60f0d2f03 2 * EECS 397
spm71 51:1eb60f0d2f03 3 *
spm71 51:1eb60f0d2f03 4 * Assignment Name: Lab 6: WaG
spm71 51:1eb60f0d2f03 5 *
spm71 51:1eb60f0d2f03 6 * Authors: Sam Morrison and Phong Nguyen
spm71 51:1eb60f0d2f03 7 * File name: utility.h
spm71 51:1eb60f0d2f03 8 * Purpose: Header for WaG functions
spm71 51:1eb60f0d2f03 9 *
spm71 51:1eb60f0d2f03 10 * Created: 04/03/2018
spm71 51:1eb60f0d2f03 11 * Last Modified: 04/03/2018
spm71 51:1eb60f0d2f03 12 *
spm71 51:1eb60f0d2f03 13 ******************************************************************************/
spm71 57:aef01bd9b3be 14 #ifndef WAG_H
spm71 57:aef01bd9b3be 15 #define WAG_H
spm71 57:aef01bd9b3be 16
spm71 57:aef01bd9b3be 17 #include "mbed.h"
spm71 57:aef01bd9b3be 18 #include "io_pins.h"
spm71 57:aef01bd9b3be 19 #include "analog.h"
spm71 57:aef01bd9b3be 20 #include "display.h"
spm71 57:aef01bd9b3be 21 #include "laser.h"
spm71 57:aef01bd9b3be 22 #include "stepper.h"
spm71 57:aef01bd9b3be 23 #include "utility.h"
spm71 51:1eb60f0d2f03 24
phn10 44:4c2ba5bbba67 25 //Station Constants
phn10 77:73e1cf3a7284 26 #define STATION_A 1
phn10 77:73e1cf3a7284 27 #define STATION_B 0
phn10 44:4c2ba5bbba67 28
spm71 58:69f9a4607a16 29 //player constants
spm71 58:69f9a4607a16 30 #define GNOLLER 1
spm71 58:69f9a4607a16 31 #define WHACKER 0
spm71 58:69f9a4607a16 32
phn10 44:4c2ba5bbba67 33 //Calibration status constants
phn10 44:4c2ba5bbba67 34 #define CALIBRATED 1
spm71 57:aef01bd9b3be 35 #define NOT_CALIBRATED 0
spm71 57:aef01bd9b3be 36
spm71 58:69f9a4607a16 37 //delay times
phn10 77:73e1cf3a7284 38 #define VOLLEY_DELAY 3000
spm71 58:69f9a4607a16 39 #define LASER_DELAY 0.125
phn10 74:8881f4aeb174 40 #define LED_DELAY 0.02
spm71 58:69f9a4607a16 41
phn10 65:b8f3339b9268 42
phn10 64:72f7f5757f0d 43 //timer expired
phn10 75:49e69031799c 44 #define WHACK_EXPIRED_TIMER 50000
phn10 64:72f7f5757f0d 45
spm71 66:70efa618c378 46 void gnoll(int sensor_no, float * sensor_values);
phn10 64:72f7f5757f0d 47 void whack(int sensor_no, float * sensor_values);
spm71 62:b73067127fd6 48 void update_score(int hit, int miss);
spm71 58:69f9a4607a16 49
spm71 57:aef01bd9b3be 50 #endif