i2c communication between adafruit accelerometer breakout boards to BLE nano
Dependencies: BLE_API i2c-serial-conflict nRF51822
Fork of corny2 by
Diff: main.cpp
- Revision:
- 6:0a9f1dc921f1
- Parent:
- 5:a52a03b6d13b
- Child:
- 8:6c538756395a
diff -r a52a03b6d13b -r 0a9f1dc921f1 main.cpp --- a/main.cpp Tue Apr 11 20:39:41 2017 +0000 +++ b/main.cpp Tue Apr 11 21:43:49 2017 +0000 @@ -30,8 +30,8 @@ #endif #ifdef BLE_Nano -#define SCL 8 -#define SDA 10 +#define SCL P0_8 +#define SDA P0_10 #endif #define DEV_ADDR 0xA0 @@ -234,7 +234,7 @@ AT24C512_ReadBytes(REG_WHOAMI, whoami, 1, ADDR_ONE); pc.printf("Whoami: %d\r\n", whoami[1]); - wait(15); + wait(5); setAxisStatus(AXIS_X, true, ADDR_ONE); setAxisStatus(AXIS_Y, true, ADDR_ONE);