-
I have put all code on chat
https://gitter.im/nRF51822-Arduino-Mbed-smart-watch/Lobby -
Yes, my pinout is the same.
Did you able to get accelerometer working?
I have readed I2C pins (put them as input)
//P0_16 SCL -- default HIGH probably pullup
//P0_15 SDO/ADR -- default HIGH probably pullup
//P0_14 SDI/SDA -- default HIGH probably pullup
//P0_13 Trigger -- default LOW
//P0_12 INT1 -- default LOW
//P0_11 INT2 -- default HIGH probably pullup
//P0_10 nCS -- default HIGH probably pullup -- from datasheet is this pin is high I2C is enabled so this is ok
// The Slave Address associated with the KX022 is 0011111X,
// where the programmable bit, X, is determined by the assignment of ADDR (pin 1) to GND or IO_Vdd.
// So in this case we have adress 0011111
// 1Fh 3Fh 00111111then I put I2C scaner code and found accelerometer at that address
I2C device found at address 31 0x1F 0
in mbed there is some problem with I2C library
https://developer.mbed.org/questions/69178/NRF51-DK-I2C-not-working/
so I need to adapt sensor library
https://developer.mbed.org/teams/Rohm/code/KX022/
with code from I2C scanner
https://developer.mbed.org/users/Cannonball2134/code/I2C_Scanner/ -
@Gordon there is nothing wrong with your pinout it is all working you did great job with that
https://yadi.sk/i/wYe5nyGPucfek
I even got LCD running (initial test) we just need to get accelerometar up and running did you notices that one adress pin is high so the address is not default it is 1F, I will try to get it working and send you the code, Im shure we can get it running on espruino ....And one question how can i get lower with espruino code?
Can I see OLED driver? this would be great if I could because then I could test it and maybe (just maybe) improve something .. -
@Gordon - I now got new version of arduino where all could work got it today so I need to try.
I have tested http://developer.mbed.org and there I can get
UART TX on tx and rx pins (couse I broke TX pin :))
BTLE UART
vibro
button
i2c scanner (fixed version for NRF51) - returns address of accelerometer
and garbage on screen with oled - I use 64x48 library im in contact with developer and having problen I got only garbage on screenmaybe you can use some mbed code I can share it so you can get all of this on espruino?
-
-
-
Here are pictures of setting arduino
https://yadi.sk/d/6-6ppDOEuYTi6
I even put 32k oscilator, but still does not vibrate
I now see that I did not solder one capacitor well so I maybe that is a reason ... -
I have successfully wake up the bracelet after removing battery, and this night I was able to get all data out, but now there is a question. Is this firmware or some rubbish inside file.
file is here: https://yadi.sk/d/OEYfMU3ruXLZT -
-
-
tnx,
I will try to get it working and put it on my blog.
I see now that maybe I could use arduino, I will try that to...
https://github.com/RedBearLab/nRF51822-Arduino -
Got it all running with arduino
OLED library needs to be fix and KX022 is in main file without library but it will will be fixed.
http://www.lemilica.com/smarty-the-watch-it-is-aliveeee/
http://www.lemilica.com/ble-on-samsung-galaxy-fame/