TinyCircuits Forum

TinyCircuits Products => TinyDuino Processors & TinyShields => Topic started by: thompsc2 on May 20, 2016, 02:02:47 PM

Title: TinyScreen+ and Accelerometer
Post by: thompsc2 on May 20, 2016, 02:02:47 PM
Is there any known compatibility issue with the TinyScreen+ or Zero and the accelerometer TinyShield? I am very much an Arduino novice, but I learned enough to make several prototypes that work great with the standard TinyScreen/TinyDuino and the accelerometer. I get what seems to be nonsense data from the accelerometer when used with the TS+/Zero. I got it from the OWatch kickstarter so it's probably one of the 1st versions. Don't know if there's been any significant revision. It seems to work fine otherwise. Any help is much appreciated. Thanks!
Title: Re: TinyScreen+ and Accelerometer
Post by: Ben Rose on May 24, 2016, 03:57:57 PM
The accelerometer should definitely be compatible, but maybe there's something I missed in the software- can you post the particular code you're using and Arduino IDE version? I will test it out ASAP.
Title: Re: TinyScreen+ and Accelerometer
Post by: thompsc2 on May 27, 2016, 02:19:48 AM
I'm using Arduino 1.6.8. I'm now using your code for the BMA 250, but the code I was previously using behaved the same. I attached code just to look at the raw accelerometer data and convert to pitch and roll angles on the TS+ and the TS default. Hopefully this will more clearly show the problem than the specific code I'm using for the project a lot of which is unrelated to the accelerometer. Thank you very much!
Title: Re: TinyScreen+ and Accelerometer
Post by: Ben Rose on May 30, 2016, 06:44:15 PM
Not sure how we missed this- quick code fix, just needed a bit more strict variable casting to make sure the values are loaded correctly on the 32bit platform. Slight changes to BMA250.h/BMA250.cpp are available at:

https://codebender.cc/sketch:82279

I'll try to further clean up this old library shortly, but functionality should not change much.