Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp@0:ead7f4c94f61, 2014-10-19 (annotated)
- Committer:
- pclary
- Date:
- Sun Oct 19 07:54:04 2014 +0000
- Revision:
- 0:ead7f4c94f61
Barebones starterbot code
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| pclary | 0:ead7f4c94f61 | 1 | #include "mbed.h" |
| pclary | 0:ead7f4c94f61 | 2 | #include "Motor.h" |
| pclary | 0:ead7f4c94f61 | 3 | |
| pclary | 0:ead7f4c94f61 | 4 | |
| pclary | 0:ead7f4c94f61 | 5 | Motor rightMotor(D0, D1); |
| pclary | 0:ead7f4c94f61 | 6 | Motor leftMotor(D2, D3); |
| pclary | 0:ead7f4c94f61 | 7 | |
| pclary | 0:ead7f4c94f61 | 8 | DigitalIn rightBumper(D4); |
| pclary | 0:ead7f4c94f61 | 9 | DigitalIn leftBumper(D5); |
| pclary | 0:ead7f4c94f61 | 10 | |
| pclary | 0:ead7f4c94f61 | 11 | DigitalOut led(LED1); |
| pclary | 0:ead7f4c94f61 | 12 | |
| pclary | 0:ead7f4c94f61 | 13 | |
| pclary | 0:ead7f4c94f61 | 14 | int main() |
| pclary | 0:ead7f4c94f61 | 15 | { |
| pclary | 0:ead7f4c94f61 | 16 | rightMotor = 0.0f; |
| pclary | 0:ead7f4c94f61 | 17 | leftMotor = 0.0f; |
| pclary | 0:ead7f4c94f61 | 18 | led = 0; |
| pclary | 0:ead7f4c94f61 | 19 | |
| pclary | 0:ead7f4c94f61 | 20 | while (true) |
| pclary | 0:ead7f4c94f61 | 21 | { |
| pclary | 0:ead7f4c94f61 | 22 | |
| pclary | 0:ead7f4c94f61 | 23 | } |
| pclary | 0:ead7f4c94f61 | 24 | } |