Junichi Katsu
/
Grove_VibrationMotor
GROVE - バイブレータ サンプルプログラム
main.cpp@0:b936e8c7c30b, 2013-11-30 (annotated)
- Committer:
- jksoft
- Date:
- Sat Nov 30 02:12:57 2013 +0000
- Revision:
- 0:b936e8c7c30b
Rev1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jksoft | 0:b936e8c7c30b | 1 | #include "mbed.h" |
jksoft | 0:b936e8c7c30b | 2 | |
jksoft | 0:b936e8c7c30b | 3 | DigitalOut VibrationMotor(p5); |
jksoft | 0:b936e8c7c30b | 4 | |
jksoft | 0:b936e8c7c30b | 5 | int main() { |
jksoft | 0:b936e8c7c30b | 6 | while(1) { |
jksoft | 0:b936e8c7c30b | 7 | VibrationMotor = 1; |
jksoft | 0:b936e8c7c30b | 8 | wait(1.0); |
jksoft | 0:b936e8c7c30b | 9 | VibrationMotor = 0; |
jksoft | 0:b936e8c7c30b | 10 | wait(1.0); |
jksoft | 0:b936e8c7c30b | 11 | } |
jksoft | 0:b936e8c7c30b | 12 | } |