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:446cd3aae2a9, 2017-10-10 (annotated)
- Committer:
- okgumowski
- Date:
- Tue Oct 10 14:56:49 2017 +0000
- Revision:
- 0:446cd3aae2a9
thrthghth
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| okgumowski | 0:446cd3aae2a9 | 1 | //Programme to rotate motor at 0.5Hz indefinitely// |
| okgumowski | 0:446cd3aae2a9 | 2 | |
| okgumowski | 0:446cd3aae2a9 | 3 | #include "mbed.h" |
| okgumowski | 0:446cd3aae2a9 | 4 | |
| okgumowski | 0:446cd3aae2a9 | 5 | DigitalOut motor(p18); |
| okgumowski | 0:446cd3aae2a9 | 6 | |
| okgumowski | 0:446cd3aae2a9 | 7 | int main() { |
| okgumowski | 0:446cd3aae2a9 | 8 | while(1) { //Code to rotate motor at 0.5Hz indefnitely |
| okgumowski | 0:446cd3aae2a9 | 9 | motor = 1; |
| okgumowski | 0:446cd3aae2a9 | 10 | wait(0.25); |
| okgumowski | 0:446cd3aae2a9 | 11 | motor = 0; |
| okgumowski | 0:446cd3aae2a9 | 12 | wait(0.25); |
| okgumowski | 0:446cd3aae2a9 | 13 | } |
| okgumowski | 0:446cd3aae2a9 | 14 | } |