hello, i'm trying create debounce delay using joystick tft shield. tryed it, using examples of debounce button, tried adapt case, had no luck. can me?
code: [select]
int checkbutton()
{
int joystickstate = analogread(3);
if (joystickstate < 50) return left;
if (joystickstate < 150) return down;
if (joystickstate < 250) return press;
if (joystickstate < 500) return right;
if (joystickstate < 650) return up;
return neutral;
}
well, joysticks don't bounce. so...
Arduino Forum > Using Arduino > Programming Questions > Debouncing with joystick
arduino
Comments
Post a Comment