Starting point for the student buggy project

Dependencies:   microbit

Fork of microbit-hello-world by micro:bit

Buggy.h

Committer:
OyaideA
Date:
2017-08-07
Revision:
5:a33f016d5962
Parent:
4:2d939ef2b09c
Child:
6:edbaeaaf08bb

File content as of revision 5:a33f016d5962:

/*
This file contains the main function prototypes for the Buggy project
*/
#ifndef _BUGGY_H_
#define _BUGGY_H_

#include "MicroBit.h"

/*******************************************************************
Definition of global constants to control how to move the buggy
*******************************************************************/
#define MOVE_FORWARD            0
#define MOVE_BACKWARD           1
#define ROTATE_CLOCKWISE        2
#define ROTATE_ANTICLOCKWISE    3



void PauseLastCommand();
void ContinueLastCommand();
bool hasLastCommandCompleted();
void InitialiseBuggy();
unsigned int GetSonarTime_us();

void TestAntiCollision(unsigned int Voltage, unsigned int Time_ms, unsigned int SonarTime_us);

void MotorSpeedCharacterisation(void);

void SelfTest();

void DisplaySonarTiming();

extern MicroBit uBit;



#endif