Dr. Davis and Dr. Dyer special studies robotics project

Dependencies:   BSP_DISCO_F469NI LCD_DISCO_F469NI TS_DISCO_F469NI mbed Motordriver

Fork of Configurable_Robots by Christopher Eubanks

Committer:
blu12758
Date:
Wed May 10 02:51:54 2017 +0000
Revision:
11:10a7bb4bc714
Parent:
10:4dd8b18e07d0
Child:
18:f2a516ad24eb
SPI Stuff

Who changed what in which revision?

UserRevisionLine numberNew contents of line
blu12758 4:4989e85d16b6 1 //OU Configurable Robot Project
blu12758 4:4989e85d16b6 2 //Spring 2017
blu12758 5:be5e1177bb43 3 //William Bonner
blu12758 5:be5e1177bb43 4
blu12758 5:be5e1177bb43 5 #include "mbed.h"
blu12758 5:be5e1177bb43 6
blu12758 10:4dd8b18e07d0 7
blu12758 5:be5e1177bb43 8 class RobotModel
blu12758 5:be5e1177bb43 9 {
blu12758 5:be5e1177bb43 10 //Current mode of operation
blu12758 8:1173b502b316 11 //0 = await command
blu12758 5:be5e1177bb43 12 int _mode;
blu12758 5:be5e1177bb43 13
blu12758 11:10a7bb4bc714 14 int _larray[8];
blu12758 11:10a7bb4bc714 15 int _threshold;
blu12758 11:10a7bb4bc714 16 int _cds[2];
blu12758 11:10a7bb4bc714 17
blu12758 5:be5e1177bb43 18 public:
blu12758 5:be5e1177bb43 19
blu12758 6:8232db1ed208 20 //Constructors/Destructors
blu12758 6:8232db1ed208 21 ~RobotModel();
blu12758 6:8232db1ed208 22 RobotModel();
blu12758 6:8232db1ed208 23
blu12758 6:8232db1ed208 24 //Accessors/Mutators
blu12758 5:be5e1177bb43 25 int getMode() const {return _mode;}
blu12758 5:be5e1177bb43 26 void setMode(int m){_mode = m;}
blu12758 5:be5e1177bb43 27
blu12758 10:4dd8b18e07d0 28 //initialize the robot's hardware
blu12758 10:4dd8b18e07d0 29 void init();
blu12758 10:4dd8b18e07d0 30 //update the model based on the mode
blu12758 10:4dd8b18e07d0 31 int update();
blu12758 11:10a7bb4bc714 32
blu12758 11:10a7bb4bc714 33 //read the indicated light sensor
blu12758 11:10a7bb4bc714 34 int checkLight(int x);
blu12758 11:10a7bb4bc714 35 //read bit b of the line array
blu12758 11:10a7bb4bc714 36 int checkLine(int b);
blu12758 11:10a7bb4bc714 37 //scan the ADC on channel n
blu12758 11:10a7bb4bc714 38 int scan(int n);
blu12758 5:be5e1177bb43 39 };