RenBuggyTimed with edited function and access to seven segment display
Dependencies: SevenSegmentDisplay mbed
Fork of 1-RenBuggyTimed by
TimedMovement.h
00001 /********************************************************* 00002 *TimedMovement.h * 00003 *Author: Elijah Orr * 00004 * * 00005 *A library of functions that can be used to control the * 00006 *RenBuggy. * 00007 *********************************************************/ 00008 00009 /* include guards are used to prevent problems caused by 00010 multiple definitions */ 00011 #ifndef TIMEDMOVEMENT_H 00012 #define TIMEDMOVEMENT_H 00013 00014 /* mbed.h must be included in this file also */ 00015 #include "mbed.h" 00016 00017 /* #define LeftMotorPin p5 tells the preprocessor to replace 00018 any mention of LeftMotorPin with p5. This is used to select 00019 which pins to use to control the motors. Here pins 5 and 6 00020 are used. */ 00021 #define LeftMotorPin p5 00022 #define RightMotorPin p6 00023 00024 /* these are function prototypes that declare all the functions 00025 in the library. extern tells the compiler that the functions 00026 may be called in other files, such as main.cpp. void specifies 00027 that the function will not return a value, i.e. the program will 00028 execute the function and then move on the the next line of code. 00029 forward is the name of the function and float specifies that 00030 the function expects to be passed a variable of the format float. */ 00031 extern void forward(float); 00032 extern void left(float); 00033 extern void right(float); 00034 extern void hold(float); 00035 extern void stop(); 00036 00037 extern void readButton(float); 00038 extern int rollDice(); 00039 /* stop() is slightly different in that it doesn't expect to be passed 00040 any variables, so the parentheses can be left empty. Passing a variable 00041 to this function would cause an error */ 00042 00043 #endif // TIMEDMOVEMENT_H
Generated on Fri Jul 15 2022 21:21:34 by 1.7.2