Basic RenBuggy program - Start here with RenBuggy
Dependencies: SevenSegmentDisplay mbed
Fork of Renbed_Buggy_Basics by
main.cpp@3:152595d33544, 2016-04-21 (annotated)
- Committer:
- MiskinPrj
- Date:
- Thu Apr 21 14:42:35 2016 +0000
- Revision:
- 3:152595d33544
- Parent:
- 0:23373ebd6d3a
stop and hold at start of main
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MiskinPrj | 0:23373ebd6d3a | 1 | /********************************************************* |
MiskinPrj | 0:23373ebd6d3a | 2 | *Ren_Buggy_Basics * |
MiskinPrj | 0:23373ebd6d3a | 3 | *Author: Elijah Orr & Dan Argust * |
MiskinPrj | 0:23373ebd6d3a | 4 | * * |
MiskinPrj | 0:23373ebd6d3a | 5 | *This program demonstates use of a library of functions * |
MiskinPrj | 0:23373ebd6d3a | 6 | *(buggy_functions) to control the movement of the * |
MiskinPrj | 0:23373ebd6d3a | 7 | *RenBuggy. * |
MiskinPrj | 0:23373ebd6d3a | 8 | *********************************************************/ |
MiskinPrj | 0:23373ebd6d3a | 9 | |
MiskinPrj | 0:23373ebd6d3a | 10 | #include "mbed.h" //"mbed.h" is a library that makes it easier to program microcontrollers |
MiskinPrj | 0:23373ebd6d3a | 11 | |
MiskinPrj | 0:23373ebd6d3a | 12 | #include "buggy_functions.h" //"buggy_functions.h" contains the functions that we will use to move the buggy |
MiskinPrj | 0:23373ebd6d3a | 13 | |
MiskinPrj | 0:23373ebd6d3a | 14 | /* The basic functions available are: |
MiskinPrj | 0:23373ebd6d3a | 15 | * |
MiskinPrj | 0:23373ebd6d3a | 16 | * forward(time); |
MiskinPrj | 0:23373ebd6d3a | 17 | * left(time); |
MiskinPrj | 0:23373ebd6d3a | 18 | * right(time); |
MiskinPrj | 0:23373ebd6d3a | 19 | * hold(time); |
MiskinPrj | 0:23373ebd6d3a | 20 | * |
MiskinPrj | 0:23373ebd6d3a | 21 | * see buggy_functions.h for a full list. |
MiskinPrj | 0:23373ebd6d3a | 22 | */ |
MiskinPrj | 0:23373ebd6d3a | 23 | |
MiskinPrj | 0:23373ebd6d3a | 24 | |
MiskinPrj | 0:23373ebd6d3a | 25 | int main() //int main is run automatically. Place your program here |
MiskinPrj | 0:23373ebd6d3a | 26 | { |
MiskinPrj | 3:152595d33544 | 27 | stop(); |
MiskinPrj | 3:152595d33544 | 28 | hold(5); |
MiskinPrj | 3:152595d33544 | 29 | forward(10); //move the buggy forward for 10 seconds |
MiskinPrj | 0:23373ebd6d3a | 30 | } |