Use Accelerometer and Joystick to mimic a mouse. This is for a class project. It is done for educational purpose. It is not practical to real world use.
Dependencies: C12832_lcd MMA7660 USBDevice mbed
main.cpp@1:03d0f8a4a2d7, 2014-03-27 (annotated)
- Committer:
- thlu
- Date:
- Thu Mar 27 23:55:18 2014 +0000
- Revision:
- 1:03d0f8a4a2d7
- Parent:
- 0:22bdcdc386df
first working release for class project presentation
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thlu | 1:03d0f8a4a2d7 | 1 | // Name: T.H. Lu |
thlu | 1:03d0f8a4a2d7 | 2 | // Date: 03/27/2014 |
thlu | 1:03d0f8a4a2d7 | 3 | // Description: |
thlu | 1:03d0f8a4a2d7 | 4 | // Main function for accelestick. |
thlu | 1:03d0f8a4a2d7 | 5 | |
thlu | 0:22bdcdc386df | 6 | #include "accelestick.h" |
thlu | 0:22bdcdc386df | 7 | |
thlu | 0:22bdcdc386df | 8 | int main() |
thlu | 0:22bdcdc386df | 9 | { |
thlu | 1:03d0f8a4a2d7 | 10 | if (init_accelestick() != 0) { |
thlu | 1:03d0f8a4a2d7 | 11 | return -1; |
thlu | 1:03d0f8a4a2d7 | 12 | } |
thlu | 0:22bdcdc386df | 13 | |
thlu | 1:03d0f8a4a2d7 | 14 | while (1) { |
thlu | 1:03d0f8a4a2d7 | 15 | run_accelestick(); |
thlu | 1:03d0f8a4a2d7 | 16 | } |
thlu | 1:03d0f8a4a2d7 | 17 | } |