A program designed to run on the microbit. Used for driving a buggy.

Dependencies:   microbit

Microbit_function.h

Committer:
AdrianClarke
Date:
2017-03-27
Revision:
0:4aa6e1498925

File content as of revision 0:4aa6e1498925:


#ifndef MICROBIT_FUNCTIONS_H
#define MICROBIT_FUNCTIONS_H

#include "MicroBit.h"
#include "buggy_function.h"

/*We need to define which pins the Sensors will be on.
Potentially P0,P1,P2. all other pads 
*/
#define Left_Line_Sensor P0
#define Right_Line_Sensor P1

// This typedef is used to define the values that a compass can be
typedef enum {
    North,
    East,
    South,
    West,
    Default
}Compass_Dirs;


extern Compass_Dirs Compass();
extern void pointNorth();
extern void pointSouth();
extern void Display(Direction Current_Direction);
extern int left_Sensor();
extern int right_Sensor();
extern void microBit_Setup();

#endif