TinyScreen+ and Accelerometer

thompsc2

  • Jr. Member
  • **
    • Posts: 6
    • View Profile
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!


Ben Rose

  • Administrator
  • Hero Member
  • *****
    • Posts: 392
    • View Profile
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.


thompsc2

  • Jr. Member
  • **
    • Posts: 6
    • View Profile
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!


Ben Rose

  • Administrator
  • Hero Member
  • *****
    • Posts: 392
    • View Profile
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.


 

SMF spam blocked by CleanTalk