![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Compass Working
Diff: Tap.cpp
- Revision:
- 4:92024cb66c9c
- Parent:
- 2:ef6778c2438e
- Child:
- 5:f6762034b4c0
--- a/Tap.cpp Thu Jan 14 02:07:31 2016 +0000 +++ b/Tap.cpp Tue Jan 19 18:43:06 2016 +0000 @@ -8,7 +8,7 @@ char data1[1]; char ack; -float Tap() +void Tap_init() { acc.frequency(100000); acc_config[0]=0x31; acc_config[1]=0x0B; //data format @@ -46,7 +46,9 @@ acc_config[0]=0x2F; acc_config[1]=0x60; //map interupt ->int2 acc.write(addr,acc_config, 2); wait(0.1); - + } + float Tap() + { while(1) { wait(0.01);