![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
reads gyroscope values
main.cpp
- Committer:
- mitchelljones
- Date:
- 2015-09-18
- Revision:
- 0:637603e82d47
File content as of revision 0:637603e82d47:
#include "mbed.h" #include "L3GD20.h" Serial pc(USBTX, USBRX); L3GD20 gyro(p28, p27); float gx; float gy; float gz; int x; int main() { while(1) { gyro.read(&gx,&gy,&gz); x = (int)gx*1000; pc.printf("%d",x); wait(0.01); } }