Page 2 of 2

Re: A/B button placement seems a bit low

PostPosted: Tue Apr 15, 2014 10:44 am
by ripper121
For rotating i think you have only to change the axis in the code.

Re: A/B button placement seems a bit low

PostPosted: Tue Apr 15, 2014 10:49 am
by hrangan
Yes, though I'm not sure if the buttons are also remapped, so that the original left button now moves you right.

Re: A/B button placement seems a bit low

PostPosted: Tue Apr 15, 2014 10:53 am
by ripper121
remapping is also simple, you have to change the port number where the button is connected
in this example you only have to change this line: const int buttonPin = 2; <--Arduino Pin 0-13

http://arduino.cc/en/tutorial/button

Re: A/B button placement seems a bit low

PostPosted: Tue Apr 15, 2014 11:11 am
by rodot
Directional buttons are correctly remapped when you rotate the screen ;)

You just have to change the line
Code: Select all
#define DISPLAY_ROT NOROT //set to NOROT, ROTCCW, ROT180 or ROTCW

in the file settings.c

It also changes the value of LCDWIDTH and LCDHEIGTH accordingly so you can program your game for it to work either in landscape or portrait mode.

Re: A/B button placement seems a bit low

PostPosted: Tue Apr 15, 2014 11:14 am
by hrangan
Awesome. Your libraries are awe inspiring rodot. So much goodness in them ;)

Re: A/B button placement seems a bit low

PostPosted: Tue Apr 15, 2014 11:36 am
by rodot
Hahaha thanks, I do my best :)