BMA250 Accelerometer stacked with Tinyduino - Interrupt Recognition Problem

ANDYW · 1 · 4573

ANDYW

  • Newbie
  • *
    • Posts: 1
    • View Profile
New to all of this but I have been able to set the single tap interrupt on the BMA250 and know that this is working correctly by reading the interrupt status register in a loop. I have mapped the interrupt to PIN 5 (INT1) on the Accelerometer. My assumption is that this is connected in the Tinyduino shield stack to PIN 2 on the Tinyduino? Where can I go to see these break-out connections?

The problem is when I try and attach the interrupt as follows:

volatile boolean flag=false;

attachInterrupt(0, fSingleTap, CHANGE);

// Interrupt Service Routine (ISR)
void fSingleTap()
{
    flag = true;
}

I get a constant stream of interrupts, even when not tapping the accelerometer, and no others are enabled (have checked this). If I use: attachInterrupt(1, fSingleTap, CHANGE); I get no interrupts at all.

Is anyone able to give me a pointer here? If I remove the accelerometer (as a test) then I don't get the stream of interrupts.


 

SMF spam blocked by CleanTalk