0

Arduino IDE does not get the information when my phone is tilted to the right. All the other directions work perfectly fine. I used several other phones to test if there was something wrong with mine, but on the others it does not work aswell. The controller on the screen also shows that I'm tilting my phone to the right.

When I use the digital mode in the Dabble app, everything works fine. So I think something is going wrong between dabble and Arduino IDE.

Share a link to this question (includes your user id)
| edit | | close | delete |
0

It is probably a problem with this if statement in the example sketch bt_dabble_gamepad_accl.ino:

  if (d>=1) {
    message("forward");
  }
  else if (d<=-1) {
    message("backward");
  }
  else {
    if(a>0 && a<270) message("left");
    else if(a>270) message("right");
  }

The lines before that if-statement display the raw values (under the comment "// print data to the display"). You can try to see if when tilting your breadboard these values show values you can use to adjust the if-statement.

Otherwise, if you are unable to find proper values, you can continue the assignment with the digital gamepad.

Share a link to this answer (includes your user id)
| edit | delete |

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.