please publish my library
Fork of accelerometer by
main.cpp@2:2c7a73d3ae57, 2013-08-06 (annotated)
- Committer:
- asifahmad
- Date:
- Tue Aug 06 10:36:35 2013 +0000
- Revision:
- 2:2c7a73d3ae57
- Parent:
- 1:e965533a31b2
please forgive the errors..this is the updated library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
asifahmad | 1:e965533a31b2 | 1 | #include "mbed.h" |
asifahmad | 1:e965533a31b2 | 2 | #include "Accelerometer.h" |
asifahmad | 2:2c7a73d3ae57 | 3 | Serial pc(USBTX, USBRX); |
asifahmad | 1:e965533a31b2 | 4 | |
asifahmad | 2:2c7a73d3ae57 | 5 | void main() { |
asifahmad | 1:e965533a31b2 | 6 | Accel acc(p18, p19, p20); |
asifahmad | 1:e965533a31b2 | 7 | while(1){ |
asifahmad | 1:e965533a31b2 | 8 | pc.printf("accel = %5.3f, accelX = %5.3f, accelY = %5.3f, accelZ = %5.3f\n", |
asifahmad | 2:2c7a73d3ae57 | 9 | acc.readall(),acc.readx(), acc.ready(), acc.readz()); |
asifahmad | 1:e965533a31b2 | 10 | wait(1.0); |
asifahmad | 1:e965533a31b2 | 11 | }} |