Is it possible to connect a Tessel Accelerometer module to an Espruino (WiFi)? #929
Replies: 3 comments
-
Posted at 2017-04-08 by trusktr I suppose it doesn't matter much since I bought both the Tessel+Accelerometer and Espruino+MPU6050 module, so I can experiment. :D My guess is that to make Tessel's work on Espruino I would have to write an Espruino module for it. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-04-08 by @gfwilliams 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 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-04-08 by trusktr Thanks! Looks like the MPU6050 is going to be easier to work with to just get up and running with the existing module. You're right, making a module for the Tessel accelerometer based on Adafruit's code does seem fairly easy, but I'm definitely going to skip on that if the MPU6050 simply works. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-04-07 by trusktr
Hello, I ordered a Tessel2 + Accelerometer, and I'd also like to order an Espruino. I am wondering if I can hook the Tessel Accelerometer to an Espruino, or if I should buy another accelerometer?
I'm sort of new to all this, I only have prior experience with an Arduino but not connecting things to it.
I suppose it is simply a matter of sending the correct electrical signals into the Tessel Accelerometer, but I'm not sure how easy/hard that will be.
Beta Was this translation helpful? Give feedback.
All reactions