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.
Dependencies: mbed
Fork of frdm_Grove_Vibration_Example by
main.cpp@0:e4df2641aa95, 2015-12-31 (annotated)
- Committer:
- GregC
- Date:
- Thu Dec 31 23:46:30 2015 +0000
- Revision:
- 0:e4df2641aa95
Freedom Seeed Grove Vibration Example
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| GregC | 0:e4df2641aa95 | 1 | #include "mbed.h" |
| GregC | 0:e4df2641aa95 | 2 | |
| GregC | 0:e4df2641aa95 | 3 | DigitalOut vibMotor(D6); |
| GregC | 0:e4df2641aa95 | 4 | |
| GregC | 0:e4df2641aa95 | 5 | int main() |
| GregC | 0:e4df2641aa95 | 6 | { |
| GregC | 0:e4df2641aa95 | 7 | int timer = 1; |
| GregC | 0:e4df2641aa95 | 8 | while(1) { |
| GregC | 0:e4df2641aa95 | 9 | vibMotor = 1; |
| GregC | 0:e4df2641aa95 | 10 | wait(timer); |
| GregC | 0:e4df2641aa95 | 11 | vibMotor = 0; |
| GregC | 0:e4df2641aa95 | 12 | wait(timer); |
| GregC | 0:e4df2641aa95 | 13 | } |
| GregC | 0:e4df2641aa95 | 14 | } |
