Yes, it looks like the Tessel accelerometer board has a mma84 on it? There shouldn't be anything to stop you using it with Espruino at all, but yes - you'd have to write some code to interface with it. It doesn't have to be a module, but it'd be great if you could share it :)
There's a lot of boilerplate there, but at the end of the day it looks pretty straightforward (write to some registers to initialise, read XYZ as 3 x 16 bit values).
You basically just care about those magic numbers for initialisation, but all the rest of it is basically the same as existing I2C accelerometers - you could just use http://www.espruino.com/LSM303DLHC as a base
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks!
Yes, it looks like the Tessel accelerometer board has a mma84 on it? There shouldn't be anything to stop you using it with Espruino at all, but yes - you'd have to write some code to interface with it. It doesn't have to be a module, but it'd be great if you could share it :)
Tessel's code for it is here: https://github.com/tessel/accel-mma84/blob/master/index.js
There's a lot of boilerplate there, but at the end of the day it looks pretty straightforward (write to some registers to initialise, read XYZ as 3 x 16 bit values).
Rather than decoding Tessel's code, it might be easier to look at Adafruit's driver: https://github.com/adafruit/Adafruit_MMA8451_Library/blob/master/Adafruit_MMA8451.cpp#L104
You basically just care about those magic numbers for initialisation, but all the rest of it is basically the same as existing I2C accelerometers - you could just use http://www.espruino.com/LSM303DLHC as a base