
test
Dependents: MouseHybridSenseCode
Diff: funcdef.h
- Revision:
- 3:7f44ab64e96b
- Parent:
- 0:c0c329729a7a
- Child:
- 4:f1670eec4681
--- a/funcdef.h Sun Feb 25 21:12:07 2018 +0000 +++ b/funcdef.h Mon Mar 05 22:40:25 2018 +0000 @@ -1,7 +1,45 @@ +//these are used to define the file once +#ifndef FUNCDEF_H +#define FUNCDEF_H #include "mbed.h" +//Set up PC link (comment out when not using) +static Serial pc = Serial(USBTX, USBRX); + +//Pin Definitions +#define sensor1pin A0 +#define sensor2pin A1 +#define sensor3pin A2 +#define sensor4pin A3 +#define sensor5pin A4 +#define sensor6pin A5 +#define sensor7pin A6 +#define sensor8pin D3 + +#define leftMotorpin D5 +#define rightMotorpin D6 + +static DigitalOut LEDVal = DigitalOut(LED1); +static PwmOut leftMotorVal = PwmOut(leftMotorpin); +static PwmOut rightMotorVal = PwmOut(rightMotorpin); + +static int sensorValue[] = {0,0,0,0,0,0,0,0}; + +static int sensorMinValue[] = {0,0,0,0,0,0,0,0}; +static int sensorMaxValue[] = {0,0,0,0,0,0,0,0}; + +static int sensorMinValue1[] = {0,0,0,0,0,0,0,0}; +static int sensorMaxValue1[] = {0,0,0,0,0,0,0,0}; + +static int sensorMinValue2[] = {0,0,0,0,0,0,0,0}; +static int sensorMaxValue2[] = {0,0,0,0,0,0,0,0}; + +static int sensorThreshold[] = {0,0,0,0,0,0,0,0}; + +static AnalogIn sensorPin[] = {A0,A1,A2,A3,A4,A5,A6,D3}; + +//Function Definitions +void CalibrateFunc(void); void func(void); - - - +#endif // FUNCDEF_H \ No newline at end of file