-
• #3
I checked that discussion but didn't see anything specific on the accel. I'm going to assume it's a BMA421 and follow the BMA423 specs. My issue is I'm new to I2C... how do I know what the device address is? And I see your version writes to a register in order to read it. Is that typical I2C?
-
• #4
OK, turns out the address is still 0x18, and using your accel.js code reading/writing seems to work (I got a 0x11 back as the ID), so I think I'm good. But the question still stands: how does one determine the address of the chip?
-
• #5
Any one have luck with the P8 / accel? I'm able to get x,y,z from it, but as for step counts, or setting the interrupt I'm lost. I've got datasheet for 423 (allegedly the same as 421...??) and sample C code from several sources, but I can't seem to get anything useful. Looks like µPython got it working, and I'm following the logic, but no luck!
-
• #7
Hi, no plans to merge at the moment as I also had to add non-standard Espruino fns to disable and enable SPI to switch between lcd driver and storage access. Gordon rightly thinks this is a bit of a hack. It is unique to the P8 as in shares SPI. I will update the build to current Espruino in the next few weeks when I get a chance.
-
• #8
totally understand, and no rush! just curious. Who knows, future Bangles may need a shared SPI and use a _DSHARED_SPI flag. Anyway, nice work!
-
• #9
actually that flag got upstream and I am using it in P8 builds, it wouldn't work without it
https://github.com/espruino/Espruino/blob/5739c2aad424102842307dc8194f10e79bb8c769/targets/nrf5x/jshardware.c#L2336
with this you can deselect flash CS pin from video driver and the flash reading recovers here
There was maybe different issue with merging?
If I'm not posting in the right place, please LMK. I have jeffmer's P8 firmware (2v09.343) running on my P8. Things are looking good, but the ACCEL doesn't seem active (ACCEL.read() ={ ax: 0, ay: 0, az: 0 }). I tried to ACCEL.init() but still doesn't give any readings. Watch won't wakeup on raise. Anything I can try before declaring my accelerometer to be DOA?