JBBoardに接続したモーター2つをRCBControllerでコントロールするテストです。
Dependencies: FatFileSystem TB6612FNG2 mbed
Fork of JBB_BTLE_Test by
uvc/uvcsub.cpp@7:3ed1e36587d4, 2014-05-12 (annotated)
- Committer:
- jksoft
- Date:
- Mon May 12 14:24:35 2014 +0000
- Revision:
- 7:3ed1e36587d4
- Parent:
- 0:1ed23ab1345f
First edition
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 0:1ed23ab1345f | 1 | #include "mbed.h" |
va009039 | 0:1ed23ab1345f | 2 | #include "uvc.h" |
va009039 | 0:1ed23ab1345f | 3 | |
va009039 | 0:1ed23ab1345f | 4 | void uvc::wait(float s) |
va009039 | 0:1ed23ab1345f | 5 | { |
va009039 | 0:1ed23ab1345f | 6 | Timer t; |
va009039 | 0:1ed23ab1345f | 7 | t.start(); |
va009039 | 0:1ed23ab1345f | 8 | while(t.read() < s) { |
va009039 | 0:1ed23ab1345f | 9 | poll(); |
va009039 | 0:1ed23ab1345f | 10 | } |
va009039 | 0:1ed23ab1345f | 11 | } |
va009039 | 0:1ed23ab1345f | 12 | |
va009039 | 0:1ed23ab1345f | 13 | void uvc::wait_ms(int ms) |
va009039 | 0:1ed23ab1345f | 14 | { |
va009039 | 0:1ed23ab1345f | 15 | Timer t; |
va009039 | 0:1ed23ab1345f | 16 | t.start(); |
va009039 | 0:1ed23ab1345f | 17 | while(t.read_ms() < ms) { |
va009039 | 0:1ed23ab1345f | 18 | poll(); |
va009039 | 0:1ed23ab1345f | 19 | } |
va009039 | 0:1ed23ab1345f | 20 | } |
va009039 | 0:1ed23ab1345f | 21 |