Starting point for the student buggy project

Dependencies:   microbit

Fork of microbit-hello-world by micro:bit

Committer:
OyaideA
Date:
Mon Aug 07 18:57:55 2017 +0000
Revision:
5:a33f016d5962
Parent:
4:2d939ef2b09c
Child:
6:edbaeaaf08bb
Now with a cleaned up main.cpp

Who changed what in which revision?

UserRevisionLine numberNew contents of line
OyaideA 2:47b7a55b0805 1 /*
OyaideA 2:47b7a55b0805 2 This file contains the main function prototypes for the Buggy project
OyaideA 2:47b7a55b0805 3 */
OyaideA 2:47b7a55b0805 4 #ifndef _BUGGY_H_
OyaideA 2:47b7a55b0805 5 #define _BUGGY_H_
OyaideA 2:47b7a55b0805 6
OyaideA 2:47b7a55b0805 7 #include "MicroBit.h"
OyaideA 2:47b7a55b0805 8
OyaideA 2:47b7a55b0805 9 /*******************************************************************
OyaideA 2:47b7a55b0805 10 Definition of global constants to control how to move the buggy
OyaideA 2:47b7a55b0805 11 *******************************************************************/
OyaideA 2:47b7a55b0805 12 #define MOVE_FORWARD 0
OyaideA 2:47b7a55b0805 13 #define MOVE_BACKWARD 1
OyaideA 2:47b7a55b0805 14 #define ROTATE_CLOCKWISE 2
OyaideA 2:47b7a55b0805 15 #define ROTATE_ANTICLOCKWISE 3
OyaideA 2:47b7a55b0805 16
OyaideA 2:47b7a55b0805 17
OyaideA 2:47b7a55b0805 18
OyaideA 2:47b7a55b0805 19 void PauseLastCommand();
OyaideA 2:47b7a55b0805 20 void ContinueLastCommand();
OyaideA 2:47b7a55b0805 21 bool hasLastCommandCompleted();
OyaideA 2:47b7a55b0805 22 void InitialiseBuggy();
OyaideA 2:47b7a55b0805 23 unsigned int GetSonarTime_us();
OyaideA 2:47b7a55b0805 24
OyaideA 3:c3a42966b47c 25 void TestAntiCollision(unsigned int Voltage, unsigned int Time_ms, unsigned int SonarTime_us);
OyaideA 3:c3a42966b47c 26
OyaideA 4:2d939ef2b09c 27 void MotorSpeedCharacterisation(void);
OyaideA 4:2d939ef2b09c 28
OyaideA 5:a33f016d5962 29 void SelfTest();
OyaideA 5:a33f016d5962 30
OyaideA 5:a33f016d5962 31 void DisplaySonarTiming();
OyaideA 5:a33f016d5962 32
OyaideA 2:47b7a55b0805 33 extern MicroBit uBit;
OyaideA 2:47b7a55b0805 34
OyaideA 2:47b7a55b0805 35
OyaideA 2:47b7a55b0805 36
OyaideA 2:47b7a55b0805 37 #endif
OyaideA 3:c3a42966b47c 38
OyaideA 5:a33f016d5962 39